Locations & Geofences

Activate geolocated notifications

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)

17841784

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.

The locationPermissionMode parameter must be added when the SDK is initialized. This is done using the following code excerpt:

let config = INConfig(appKey: "<YOUR-APP-KEY>")
config.locationPermissionMode = .automatic
Indigitall.initialize(with: config, onIndigitallInitialized: nil, onErrorInitialized: nil);
//Remember to put your external code here
[IndigitallObjc setExternalCodeWithCode:@"YOUR_EXTERNAL_ID" 
    success:^(INDevice *device) {
        //DO SOMETHING
    } failed:^(INError* error){
        //LOG ERROR
    }];

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.