iOS Location updates policy#
Your app must have access to the location updates. Location data is monitored continuously during a protection session but also used during an emergency, to send the user’s real-time location to our emergency services.
Enable Location Services (iOS level)#
First of all, your app must ensure at any time that Location Services are activated on the device, by the user.
See Apple’s Location Services description.
Receive User Location in App Foreground Execution#
The SDK requires at least the “While using the App” location authorization, granted by the user, to be able to receive user location updates. You should request it if they have not granted it to your app yet. It allows your app to receive user location updates.
See Requesting authorization to use location services in the Apple developer documentation.
Receive User Location in App Background Execution#
An app can be considered by the OS as being in background execution for a variety of reasons (ex: the phone is locked or the user switched to another app) which can stop the location updates. You must tell the OS that you want to receive location updates in background execution too. Otherwise there is a risk that some accidents will not be detected.
See Add the background mode capability in the Apple developer documentation.
Survive a Crash or a Kill#
Despite all the previous precautions, there is still a risk that your app crashes or be killed by the OS (e.g. to preserve memory when too many applications are active).
This would be damaging when an emergency is ongoing. In this case, when your app restarts, the SDK will resume automatically to complete these tasks:
Emergency sending
Post-accident location tracking
For your app being restarted by the OS automatically after a crash or a kill, you have to start the “significant location” updates mechanism by calling relative method somewhere in your app’s code. To have access to it, the “While using the App” location authorization is not enough and you should request the “Always” location authorization from the user.
See Process location updates after an app launch in the Apple developer documentation.
App Store Review#
If your app has never requested the “Always” location authorization, during the next review of your app by Apple you will have to explain why you need it.
This should not pose any significant difficulty since accident detection is a legitimate use case. We can help you with this process and help you answer the App Store Review process if you need.