0

I'm trying in the first screen load the contacts so i used this:

if authStatus != ABAuthorizationStatus.Authorized {
        // Ask for permission
        var sema = dispatch_semaphore_create(0)
        ABAddressBookRequestAccessWithCompletion(addressBook, { (success, error) in
            if success {
                ABAddressBookCopyArrayOfAllPeople(addressBook).takeRetainedValue() as NSArray
                dispatch_semaphore_signal(sema)
            }
        })

But the problem is than the prompt appear when you stop de demo or close the app... i load this in viewdidload... there is a better way to do it?

Pedro Manfredi
  • 3,768
  • 5
  • 19
  • 24

0 Answers0