On iOS, the user must grant access permission to the phone's location in background to enable the trip detection function included in the Trip Analysis component. There are several options for this permission and automatic mode will only work if the user selects the "Always" option.
The Permissions Utils component provides a set of screens to guide the user through the selection of the right options. Once the user has correctly authorized access to the location, you are warned by the closure passed in parameter:
// Code called when permissions (here: "location" and "activity"), are both properly granted.
The diagnosis screen is divided into four areas:
The first displays the status of sensors and permissions.
The second contains a quick link to the battery optimization functions.
The third displays a contact button to reach support.
The fourth section allows you to enable an activity log.
Layout of the diagnosis screen on iOS
The first two areas are always displayed. The third and fourth are optional.
The diagnosis function of the SDK has the following configurations:
In area 1, the sensors and permissions to be checked are selected automatically except for the Bluetooth sensor. If your application does not use a Bluetooth device or an iBeacon, it is not necessary to monitor the status of the Bluetooth sensor.
Area 2 is always displayed. If battery optimization is enabled, a link will appear to redirect the user to the phone settings. The user will have to open the battery settings to disable the optimization.
In area 3, it is possible to configure the recipient's email address for the support request or a web address to which the user can be directed.
Area 4 can be hidden if necessary.
Bluetooth sensor status check
Access to the Bluetooth sensor is not required on iOS. This permission is not requested when the application is first installed.
For natural triggering (i.e. from the phone's sensors), or using an iBeacon, Bluetooth access is not required.
Access to the Bluetooth sensor is required in the two cases described below:
To enable automatic start of trip recording from a Bluetooth device.
To measure the battery level of an iBeacon device.
By default, access to the Bluetooth sensor is not monitored. But if you want to check it, add the following line after the initialization when configuring the module in the AppDelegate: