Type Method

authorizationStatus(for:)

Returns the current authorization status to access the contact data.

Declaration

class func authorizationStatus(for entityType: CNEntityType) -> CNAuthorizationStatus

Parameters

entityType

Set to CNEntityType.

Return Value

The current authorization status to access the contact data.

Discussion

Based on the authorization status, your application might display or hide its UI elements that access any Contacts API. This method is thread-safe and will not block your application. To see different authorization status, see CNAuthorizationStatus.

See Also

Requesting Access to the User's Contacts

enum CNAuthorizationStatus

An authorization status the user can grant for an app to access the specified entity type.

enum CNEntityType

The entities the user can grant access to.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software