How do I correctly use ABAddressBookCreateWithOptions method in iOS 6?

Now that the NDA has been lifted, here is my solution for this for the where you need replace a method which returns an Array. (If you’d rather not block while the user is deciding and are ready to potentially rewrite some of your existing code, please look at David’s solution below): ABAddressBookRef addressBook = … Read more

Dealing with duplicate contacts due to linked cards in iOS’ Address Book API

One method would be to only retrieve the contacts from the default address book source: ABAddressBookRef addressBook = ABAddressBookCreate(); NSArray *people = (__bridge NSArray *)ABAddressBookCopyArrayOfAllPeopleInSource(addressBook, ABAddressBookCopyDefaultSource(addressBook)); But that is lame, right? It targets the on-device address book, but not extra contacts that might be in Exchange or other fancy syncing address books. So here’s the … Read more

Toggling Privacy settings will kill the app

the OS sends a SIGKILL which is not a crash – Apple session on privacy in iOS6 says: If permissions changes, app is quit. Background task expiration handler is called, if registered iOS then kills the application. WWDC 2012 Session Videos: Privacy Support in iOS and OS X Expiration handler: beginBackgroundTaskWithExpirationHandler There is no way … Read more

Get a list of all contacts on iOS

In my original answer, at the end of this answer, I show how to retrieve contacts in iOS versions prior to 9.0 in a manner that addresses some of the problems entailed by other answers here. But, if only supporting iOS 9 and later, one should use the Contacts framework, avoiding some of the annoying … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)