Tell about new contacts api
Generated on 8/8/2024
1 search
In iOS 18, Apple introduced new APIs to enhance how apps can access and manage contacts. Here are the key points about the new Contacts API:
-
Limited Access: iOS 18 introduces a new feature called limited access, allowing users to share only a portion of their contacts with an app. This is managed through a two-stage authorization prompt:
- The first prompt asks whether to share contacts with the app.
- If the user taps "Continue," a second prompt appears, offering the option to share a specific set of contacts or grant full access.
-
Contact Access Button: This new API provides a streamlined way for apps to request access to additional contacts directly within the app's UI. It fits seamlessly into the existing UI and allows users to grant access to new contacts with a single tap. This button is particularly useful for apps that need to access contacts incrementally, such as when searching for mail recipients.
-
Authorization Levels: There are now four authorization levels for contacts:
- Full Access: The app can read and modify any contact.
- Limited Access: The app can read and modify only the contacts it has been granted access to.
- Not Determined: The app has not yet requested access.
- Denied: The app is not allowed to access contact data.
-
Contact Access Picker: This API allows users to manage which contacts an app has access to without leaving the app. It provides a more granular control over contact sharing.
-
CNContactStore: This remains the primary way to access contact data, requiring appropriate authorization. It can fetch contacts and create new entries, and it automatically presents the authorization prompt when needed.
For more detailed information, you can refer to the session Meet the Contact Access Button (02:56).
Relevant Sessions
Meet the Contact Access Button
Learn about the new Contacts authorization modes and how to improve Contacts access in your app. Discover how to integrate the Contact Access Button into your app to share additional contacts on demand and provide an easier path to Contacts authorization. We’ll also cover Contacts security features and an alternative API to be used if the button isn’t appropriate for your app.
What’s new in privacy
At Apple, we believe privacy is a fundamental human right. Learn about new and improved permission flows and other features that manage data in a privacy-preserving way, so that you can focus on creating great app experiences.