For those development partners who have already performed an integration with our original geolocation-aware nudge® Plus Library, performing an integration with our nudge® Base Code Library, which does not rely on sharing of location data, is a simple matter of removing a few parameters and processes. The fundamental elements of push notification delivery and capture of analytics is otherwise identical between the two libraries.
This guide assumes you are already familiar with the full integration of the Plus Code Library. If you need to reference any of the complete integration guides for either platform, those are provided here:
| iOS | Android | |
| nudge® Base Code Library | Click here | Click here |
| nudge® Plus Code Library | Click here | Click here |
Preparing your app (iOS only)
Selecting your app's target in the file navigator of your Xcode project and then modify the "Signing & Capabilities" to remove Location updates from the Background Modes section:

Importing the library
| iOS: | |
|
In your Similarly, update other |
| Android: | |
|
Change the library reference in your build.gradle file to Similarly, change the |
Modifying the nudge initialization
For both iOS and Android, when declaring and initializing the myNudge object, update the reference from Nudge to NudgeBase.
Removing irrelevant initialization parameters
A number of the initialization parameters for the nudge® Plus library are related to prompting the device holder for proper location permissions. Those are removed for a nudge® Base implementation. Here are the parameters you should remove:
| iOS: |
|
| Android: |
|
An important note about Federation Id
This initialization parameter had been marked as optional in previous integration guides, but depending on the implementation details for a given client this may be required. In any case it is highly recommended as it provides the foundation for creating data-driven targeted messaging. Please contact Support if you are unsure about the configuration status for a specific client, or would like to understand more about how to implement this in a general fashion.
Additional iOS integration adjustments
In the AppDelegate file, and anywhere else with Nudge references, as you did before change those to NudgeBase.
Remove location-specific entries from Info.plist
Assuming your app does not need Always access to location information, you should remove the following entry:
Privacy - Location Always and When In Use Usage Description (NSLocationAlwaysAndWhenInUseUsageDescription)
If your app does not need When in Use access to location information, you should also remove the following entry:
Privacy - Location When In Use Usage Description (NSLocationWhenInUseUsageDescription)
If your app does require When in Use location access, review the string associated with that entry to make sure it aligns with your app's functionality.
Additional Android integration adjustments
Monitoring for change in Nudge status
If you implemented a myNudgeStatusListener make sure to change the Nudge. object reference to NudgeBase..
Comments
0 comments
Article is closed for comments.