Install on iOS

Minimum deployment target#

In order to use Location, you need to set your minimum deployment target to iOS 13.0 or later. Change the second line in your ios/Podfile into:

platform :ios, '13.0'

Info.plist#

In order to request location permissions, you need to add the following to your ios/Runner/Info.plist:

<key>NSLocationWhenInUseUsageDescription</key>
<string>The app needs the location</string>

The string will appear in the popup when the user is asked to grant location permissions.

Background location#

If you want to receive background location, you need to add the following to your ios/Runner/Info.plist:

<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>The app needs the location</string>

The string will appear in the popup when the user is asked to grant background location permissions.

You also need to activate Background mode for your Runner. Open XCode and go to "Signing & Capabilities". Add the "Background Modes" section and add "Location updates" to the list.