Property List Key

NSLocationAlwaysUsageDescription

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

Details

Name
Privacy - Location Always Usage Description
Type
string

Discussion

Use this key if your iOS app accesses location information in the background, and you deploy to a target earlier than iOS 11. In that case, add both this key and NSLocationAlwaysAndWhenInUseUsageDescription to your app’s Info.plist file with the same message. Apps running on older versions of the OS use the message associated with NSLocationAlwaysUsageDescription, while apps running on later versions use the one associated with NSLocationAlwaysAndWhenInUseUsageDescription.

If your app only needs location information when in the foreground, use NSLocationWhenInUseUsageDescription instead. For more information, see Choosing the Location Services Authorization to Request.

If you need location information in a macOS app, use NSLocationUsageDescription instead.

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.

CLAuthorizationStatus

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

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