Enumeration

CLAuthorizationStatus

Constants indicating the app's authorization to use location services.

Declaration

typedef enum CLAuthorizationStatus : int {
    ...
} CLAuthorizationStatus;

Overview

Handle changes to authorization status in your location manager's delegate method, locationManager:didChangeAuthorizationStatus:.

Topics

Authorization Status

kCLAuthorizationStatusNotDetermined

The user has not chosen whether the app can use location services.

kCLAuthorizationStatusRestricted

The app is not authorized to use location services.

kCLAuthorizationStatusDenied

The user denied the use of location services for the app or they are disabled globally in Settings.

kCLAuthorizationStatusAuthorized

The user authorized the app to use location services.

kCLAuthorizationStatusAuthorizedAlways

The user authorized the app to start location services at any time.

kCLAuthorizationStatusAuthorizedWhenInUse

The user authorized the app to start location services while it is in use.

See Also

Authorization

Choosing the Location Services Authorization to Request

Determine the authorization your app needs to access location data.

Requesting Authorization for Location Services

Ask the user for permission to access their location.

Responding to Changes in Authorization Status

Receive and respond to changes in your app's authorization status in your delegate's method.

property list key NSLocationAlwaysAndWhenInUseUsageDescription

A message that tells the user why the app is requesting access to the user’s location information at all times.

Name: Privacy - Location Always and When In Use Usage Description
property list key NSLocationWhenInUseUsageDescription

A message that tells the user why the app is requesting access to the user’s location information while the app is running in the foreground.

Name: Privacy - Location When In Use Usage Description
property list key NSLocationUsageDescription

A message that tells the user why the app is requesting access to the user’s location information.

Name: Privacy - Location Usage Description
property list key NSLocationAlwaysUsageDescription

A message that tells the user why the app is requesting access to the user's location at all times.

Name: Privacy - Location Always Usage Description
Deprecated

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