Location
About location
Location is one of the risk parameters that can be sent to the server.
How does location work?
Once configured, location data will be included in all requests to the server. The following values are collected:
latitudelongitudeaccuracyaltitude
When location is enabled, the location manager is not started until one of the start calls has been invoked. The location manager is disabled as soon as the finish call is completed.
The location manager remains disabled until the next start call is invoked.
How to configure location
To enable collection of location by the Encap SDK, you must check that ENABLED_RISK_DATA is set to ALL, or that it contains Location in the application configuration.
Add usage description
The usage description is the message that will be presented to the end-user the first time that the SDK starts looking for a location. To add this, set a value forNSLocationWhenInUseUsageDescription in the app's Info.plist file.
Accuracy
To set your desired accuracy, you can use EncapConfig setLocationAccuracy. The default value is kCLLocationAccuracyHundredMeters.
To learn more, see Core Location Constants in the Apple developer documentation.
Permission
By default, when location or geofencing is enabled, the SDK prompts for location permission if not done by the app in the following operations:
startActivationstartAddOrUpdatestartAuthenticationstartAddOrUpdateOfRecoverystartDeleteRecoverystartRecovery
The locationEnabled flag found on EncapConfig can be used to prevent the SDK from prompting for location permission during enrolment.
You can re-enable location updates after the end-user has enrolled or after your app has requested location permission.
You should be aware of the configuration that is used for the applicationId before changing this, as disabling location updates when geofencing is set to REQUIRED mode may result in unintended behaviour.