-1

My app offers user the option to import Contacts. When you try to access Contacts, Apple shows its privacy dialog. Then if the user selects Allow Access and, in turn, Share All Contacts, full access is granted.

After the initial selection, if anything less than full access is granted, I have code that sends the user to Settings where they should have the option to choose again between None, Limited Access and Full Access as below for Facebook. If they choose not to go to settings, I show them Apple's contact picker.

However, sometimes for my app, instead of showing what Facebook shows, it shows "Private Access" with no ability to choose another option. Could this be because I briefly let them use the Contact Picker? I don't think that should be the case. Is this an Apple bug?

Private Access is not one of the normal 3 options as shown for Facebook, None, Limited Access and Full Access. I'm not sure what it is.

Even when I delete the app from the phone, and reinstall it using Xcode, I am currently getting the same problem.

What could be causing this and, even if it is a bug on Apple's part, what workaround could I use to prevent it?

 (IBAction)seeSystemContacts:(id)sender {
    if ([self fullAccessToSystemContacts]) {
        [self launchImportContactsVC];//This takes user to a VC where they can see contacts
    }
    else { //Following launches a dialog with two options
        [[Utilities shared] getUserInputOnVC:self
                                       title:@"See Contacts"
                                        body:@"Allow app to access your contacts in Settings" buttons:@[@"Not now", @"Settings"]  completion:^(NSInteger choice){
            if (choice==1) {
//That would be Go to Settings
                [self gotoSettings];
            }
            else {
//Not now
//Third Fallback if they click Not Now, show them contactPicker option
                [[ContactPicker shared] openContactPickerOnViewController:self completion:^(NSArray *contacts){
                    [self.fetchedResultsController performFetch:nil];
                    [self.tableView reloadData];
                }];
            }
 
        }];
        
    }
}


-(BOOL)fullAccessToSystemContacts {
    CNContactStore *store = [[CNContactStore alloc] init];
    CNAuthorizationStatus status = [CNContactStore authorizationStatusForEntityType:CNEntityTypeContacts];
        if (status == CNAuthorizationStatusAuthorized) {
           
            return YES;
        }
    return NO;
}

enter image description here

enter image description here

2
  • 1
    “However, sometimes for my app, instead of showing what Facebook shows, it shows ‘Private Access’ with no ability to choose another option.” … You’ll get the “private access” setting if a user picked a contact with a picker without NSContactsUsageDescription. You get the Facebook options when you request access to CNContactStore (assuming you set the NSContactsUsageDescription).
    – Rob
    Commented Apr 15 at 17:44
  • To put it another way, Private Access is exactly what the picker provides, because the user is using the picker to determine which contact information is sent to your app. If passing through the picker is sufficient for your app, then it doesn't actually need full access.
    – matt
    Commented Apr 21 at 0:41

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.