user3300758 user3300758 - 3 months ago 22x
Objective-C Question

ABAddressBookCreate deprecated

I'm creating an application that will save a contact to the address book, but when I use ABAddressBookCreate to my code, it appear as a warning. I'm coding in iOS 7.

My question is, what is the substitute for ABAddressBookCreate in iOS 7.

Any help will be appreciated. Thanks.


Use ABAddressBookCreateWithOptions() instead.

ABAddressBookRef addressBook = ABAddressBookCreateWithOptions(NULL, NULL);

More info on usage in the documentation here


The AddressBook framework is deprecated in iOS 9 and replaced with the new and improved Contacts framework: