About accessing the iOS system Address Book method.

Source: Internet
Author: User

One, in iOS, there are 2 frames that can access the user's address book:

1, Addressbookui.framework
"Provides the system with the Contact list interface, contact details interface, add contact interface, and so on.
"is typically used to select contacts.

2, Addressbook.framework
"Pure C-language API, just get contact data."
"Does not provide UI interface display, need to build their own contact display interface."
"Most of the data types are based on the core Foundation framework, which is difficult to use.

Second, but starting from iOS6, you need to be authorized by the user to access the Address book, so before you use, you need to check whether the user has authorized
The function that obtains the authorization status of the Address Book: Abaddressbookgetauthorizationstatus (), whose return value has the following four items:

Kabauthorizationstatusnotdetermined: The user has not yet decided whether or not to authorize your program for access.
"Kabauthorizationstatusrestricted:ios the Parental controls on the device or some other license configuration blocker to interact with the contacts database.
Kabauthorizationstatusdenied: The user explicitly rejects your program's access to the Address book.
Kabauthorizationstatusauthorized: The user has authorized your program to access the contacts.

About accessing the iOS system Address Book method.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.