Type Method

authorizationStatus()

Returns the app’s authorization status for using location services.

Declaration

class func authorizationStatus() -> CLAuthorizationStatus

Return Value

A value indicating whether the app is authorized to use location services.

Discussion

The system is guaranteed to call the delegate method with the app's initial authorization state and all authorization status changes.

The system manages the authorization status of a given app according to several factors. Users must authorize the app to use location services explicitly, and location services must be enabled in Settings > Privacy. See Choosing the Location Services Authorization to Request for more information.

See Also

Requesting Authorization for Location Services

func requestWhenInUseAuthorization()

Requests the user’s permission to use location services while the app is in use.

func requestAlwaysAuthorization()

Requests the user’s permission for location services whether or not the app is in use.

enum CLAuthorizationStatus

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

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