Instance Property


A Boolean value indicating whether the app wants to receive location updates when suspended.


var allowsBackgroundLocationUpdates: Bool { get set }


Apps that want to receive location updates when suspended must include the UIBackgroundModes key (with the location value) in their app’s Info.plist file and set the value of this property to true. The presence of the UIBackgroundModes key with the location value is required for background updates; you use this property to enable and disable the behavior based on your app’s behavior. For example, you might set the value to true only after the user enables features in your app where background updates are needed.

When the value of this property is false, apps receive location updates normally while running in either the foreground or background based on its current authorization. Updates stop only when the app is suspended, thereby preventing the app from being woken up to handle those events.

The default value of this property is false. Setting the value to true but omitting the UIBackgroundModes key and location value in your app’s Info.plist file is a programmer error.