IOS8/9 通讯录
步骤.1
#import "ContactGetter.h"
步骤.2
ContactGetter *get = [[ContactGetter alloc]init];
//cause the Permission alert will Blocking main thread,so delayed the function.
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[get GET:^(NSDictionary *Result) {
NSLog(@"%@",Result);
} failure:^(BOOL Result) { // The bool value named result,that means No contacts data or has no permission
if (Result) {
NSLog(@"No Data");
}else{
NSLog(@"No Permission");
//jump to setting
}
}];
});