Geofence Module
Geofencing
To enable location services in your application, you must first add the following keys to your Info.plist file.
NSLocationAlwaysAndWhenInUseUsageDescription
NSLocationWhenInUseUsageDescription
The example application of these permissions is as follows:
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>We need access to your location for better user experience.</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>We need access to your location for better user experience.</string>
You also need to add the following keys under UIBackgroundModes in your Info.plist file to monitor zones, refresh zone list and receive push notifications.
<array>
<string>fetch</string>
<string>location</string>
<string>remote-notification</string>
</array>
Then you should add the following code right after the RelatedDigital.initialize method.
RelatedDigital.geofenceEnabled = true
Â
Copyright 2020 Related Digital