The indigitall SDK can manage the user's location. This allows you to use the location filters on the send push campaign screen ( Campaigns> Push> New push campaign > Filters> Geographical filters)
Once we have enabled this functionality, the end user will have to give their consent to the location permission and enable the location services of their smartphone, so that the application can obtain the exact location of the user.
Add the following keys to the application's Info.plist file.
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key> <string>Can we always use your location?</string> <key>NSLocationAlwaysUsageDescription</key> <string>Can we always use your location?</string> <key>NSLocationWhenInUseUsageDescription</key> <string>Can we use your location when using the apps?</string>
The NSLocationAlwaysUsageDescription, NSLocationWhenInUseUsageDescription, and NSLocationAlwaysAndWhenInUseUsageDescription keys can be customized by editing the content of the tag.
Options to keep in mind
There are two ways to manage location permissions:
- Manual: It is the default option and the developer is in charge of managing the location permissions.
- Automatic: It is the SDK that manages the location permissions.
Here we explain how to configure location permissions in automatic mode.
sdk < 5.0.0 you have to use INConfig
let config = INConfig(appKey: "")
sdk > 5.0.0 <6-0-0 you have to use PushConfig
The locationPermissionMode parameter must be added when the SDK is initialized. This is done using the following code excerpt:
let config =INPushConfig(appKey: "<YOUR-APP-KEY>") config.locationPermissionMode = .automatic Indigitall.initialize(with: config, onIndigitallInitialized: nil, onErrorInitialized: nil);
INPushConfig *config = [[INPushConfig alloc]initWithAppKey:appKey]; config.locationPermissionMode = automatic; [Indigitall initializeWithAppKey:appKey onIndigitallInitialized:nil onErrorInitialized:nil];
Do not you worry about anything. Your IDs are irreversibly encrypted on the phone itself and sent securely to our servers. Not even the indigitall team can know this information.