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.