不推荐使用ABAddressBookCreate [英] ABAddressBookCreate deprecated
问题描述
我正在创建一个将联系人保存到地址簿的应用程序,但是当我将ABAddressBookCreate用于我的代码时,它会显示为警告。我在iOS 7中编码。
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.
我的问题是,iOS 7中ABAddressBookCreate的替代品是什么。
My question is, what is the substitute for ABAddressBookCreate in iOS 7.
任何帮助将不胜感激。谢谢。
Any help will be appreciated. Thanks.
推荐答案
请改用 ABAddressBookCreateWithOptions()
。
ABAddressBookRef addressBook = ABAddressBookCreateWithOptions(NULL, NULL);
编辑
在iOS 9中不推荐使用AddressBook框架,并将其替换为新的和改进的Contacts框架: https ://developer.apple.com/library/ios/documentation/Contacts/Reference/Contacts_Framework/index.html#//apple_ref/doc/uid/TP40015328
The AddressBook framework is deprecated in iOS 9 and replaced with the new and improved Contacts framework: https://developer.apple.com/library/ios/documentation/Contacts/Reference/Contacts_Framework/index.html#//apple_ref/doc/uid/TP40015328
这篇关于不推荐使用ABAddressBookCreate的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!