Skip to main content

GeolocatorIosConfiguration

iOS specific settings.

Inherits: GeolocatorConfiguration

Properties

  • activity_type - The location manager uses the information in this property as a cue to determine when location updates may be automatically paused.
  • allow_background_location_updates - Flag to allow the app to receive location updates in the background (iOS only)
  • pause_location_updates_automatically - Allows the location manager to pause updates to improve battery life on the target device without sacrificing location data.
  • show_background_location_indicator - Flag to ask the Apple OS to show the background location indicator (iOS only) if app starts up and background and requests the users location.

Properties

activity_typeclass-attributeinstance-attribute

The location manager uses the information in this property as a cue to determine when location updates may be automatically paused.

allow_background_location_updatesclass-attributeinstance-attribute

allow_background_location_updates: bool = True

Flag to allow the app to receive location updates in the background (iOS only)

Note

For this setting to work Info.plist should contain the following keys:

  • UIBackgroundModes and the value should contain "location"
  • NSLocationAlwaysUsageDescription

pause_location_updates_automaticallyclass-attributeinstance-attribute

pause_location_updates_automatically: bool = False

Allows the location manager to pause updates to improve battery life on the target device without sacrificing location data. When this property is set to True, the location manager pauses updates (and powers down the appropriate hardware) at times when the location data is unlikely to change.

show_background_location_indicatorclass-attributeinstance-attribute

show_background_location_indicator: bool = False

Flag to ask the Apple OS to show the background location indicator (iOS only) if app starts up and background and requests the users location.

For this setting to work and for the location to be retrieved the user must have granted "always" permissions for location retrieval.