An authorization status the user can grant for an app to access the specified entity type.
SDKs
- iOS 9.0+
- macOS 10.11+
- Mac Catalyst 13.0+
- watchOS 2.0+
Framework
- Contacts
Declaration
enum CNAuthorizationStatus : Int
An authorization status the user can grant for an app to access the specified entity type.
SDKs
Framework
enum CNAuthorizationStatus : Int
case not Determined
The user has not yet made a choice regarding whether the application may access contact data.
case restricted
The application is not authorized to access contact data. The user cannot change this application’s status, possibly due to active restrictions such as parental controls being in place.
case denied
The user explicitly denied access to contact data for the application.
case authorized
The application is authorized to access contact data.
func request Access(for: CNEntity Type, completion Handler: (Bool, Error?) -> Void)
Requests access to the user's contacts.
class func authorization Status(for: CNEntity Type) -> CNAuthorization Status
Returns the current authorization status to access the contact data.
enum CNEntity Type
The entities the user can grant access to.