I have a view when it get loaded it will check first the permission to access the contacts if it's Authorized, NotDetermined or Denied .. the code at first time will go with NotDetermined so it will call function to ask for access .. the problem is here in this function :
private func requestContactsAccess() {
//store = CNContactStore()
store.requestAccessForEntityType(.Contacts) {granted, error in
if granted {
dispatch_async(dispatch_get_main_queue()) {
self.accessGrantedForContacts()
return
}
}
}
}
Now the app never ask for access to Contacts , I don't know why, it will select the permission as denied by its self .
I don't know if the problem with the code or the simulator because this work for other people .
Note : when I go to the settings of the sim , Setteings > Privacy > Contacts .. I find nothing ! just saying : 'Applications that have requested access to your contacts will appear here' . which mean the app never ask for it !
Any help ?