I am displaying a CNContactPickerViewController
. Suppose if I disable the access from settings, it should not allow to open the controller or should say pop up saying Contacts access is disabled. But in turn it is opening the view. Why is it so ? Anyone have idea about it. Is it framework bug, or should I should forcefully check using CNContactStore requestAccessForEntityType:
method?
self.mContactBookController = [[CNContactPickerViewController alloc] init];
mContactBookController.displayedPropertyKeys = @[CNContactEmailAddressesKey];
mContactBookController.predicateForEnablingContact = [NSPredicate predicateWithFormat:@"emailAddresses.@count > 0"];
[app.window.rootViewController presentViewController:mContactBookController animated:YES completion:NULL];