Last modified July 6, 2020 by Shelly Wolfe

Geo SDK upgrade guide

This guide provides information about how to upgrade to the latest Swrve Geo SDK add-on. For information about the changes that have been made in each release, see Swrve Geo release notes.

Request a copy of the latest Swrve Geo project for your platform from your CSM at support@swrve.com.


Android Version 5.0

To upgrade to v5.0 for Android:

  • Update your build.gradle file to use SwrveGeoSDK 5.0.0. For example:
  • We removed the SwrveGeoConfig.delayStart API. At an opportune time, start the SDK by calling the SwrveGeoSDK.start API. The OS will then request location permission.
  • SwrveGeoSDK.start(Activity activity) replaces the SwrveGeoSDK.start(Context context) API and requests the necessary location permissions, if required.
  • If you’re using the new method for managing location permission, remove any existing permission handling code. For more information, see the Geo integration guide.

If you’re upgrading from a pre-4.0 version, also see instructions below.


iOS Version 4.0

To upgrade to v4.0 for iOS:

Update your Podfile to use the latest SwrveSDK 6.5.3 and SwrveGeoSDK 4.0.

We removed the SwrveGeoSDK.delayStart API. At an opportune time, start the SDK by calling the [SwrveGeoSDK start] API. The OS will then request location permission.

If you’re upgrading from a pre-3.0 version, also see instructions below.


iOS Version 3.0.1

If you’re upgrading from a version prior to 3.0, see below. Otherwise, there are no code changes required to upgrade to v3.0.1.


Android Version 4.0

Upgrading from Swrve Geo SDK 2.X-3.0

Complete the following steps:

  1. Remove the following declaration from your root build.gradle if it was only used for Swrve Geo integration:
  2. Remove the following declarations from your app build.gradle:
  3. The swrve-geo-bluedot artifact has been renamed to swrve-geo. Add the following declaration to your app’s build.gradle:
  4. The Swrve Geo SDK has a hard dependance on the native SDK version 7.0. Update your build.gradle to use at least Swrve SDK 7.0. For example:
  5. The SwrveGeoSDK.init method signature has changed with the removal of the String apiKey parameter.
  6. The SwrveGeoConfig has changed to a builder pattern; see the basic example below.
  7. The following configurations have been removed from the SwrveGeoConfig with no replacement.
  8. If you’ve configured a foreground notification, it will only display on Android Oreo and above.
  9. The method signature of SwrveGeoSDK.isStarted() has been changed with the addition of a Context parameter.

Migrating from deprecated Locations SDK

Complete the following steps:

  1. Remove the following declaration from your root build.gradle:
  2. Remove the following declarations from your app build.gradle:
  3. Remove the plotconfig.json file.
  4. Remove any references to SwrvePlot classes.
  5. Follow the integration guide for installing the latest Swrve Geo SDK. For more information, see the Swrve Geo SDK integration guide.

iOS Version 3.0

Upgrading from Geo SDK version 2.X

Complete the following steps:

  1. Remove the following declaration from your Podfile:
  2. The [SwrveGeoSDK init] method signature has been changed with the removal of the String apiKey parameter.
  3. The following properties have been removed from the SwrveGeoConfig with no replacement.
  4. Remove BDPointLocalNotificationEnabled from your Info.plist.

Migrating from deprecated Locations SDK

Complete the following steps:

  1. Remove the following declaration from your Podfile:
  2. Remove the plotconfig.json file.
  3. Remove any references to SwrvePlot classes.
  4. Follow the integration guide for installing the latest Swrve Geo SDK. For more information, see the Swrve Geo SDK integration guide.

Android Version 3.0

To upgrade to v3.0 for Android, update your build.gradle file to use SwrveGeoSDK 3.0 and PointSDK 14.0.2. For example:

Remove ACCESS_COARSE_LOCATION

As of Swrve Geo SDK v3.0, the ACCESS_COARSE_LOCATION permission has been removed. Update your permissions request as required.

Background Location Permission on Android 10

Android 10 introduces a new permission for using location in the background, so it’s now necessary to request this permission on upgrade. You can use the SwrveGeoSDK.requiresLocationPermissionRequest API that we provide in the Geo SDK to check the permission and request as necessary. For example:


iOS Version 2.3.1

To upgrade to v2.3.1 for iOS, update your Podfile to use the latest SwrveGeoSDK 2.3.1 and PointSDK 15.1.2.  For example:


Version 2.3

To upgrade to v2.3:

Android

Update your build.gradle file to use SwrveSDK 6.2 and SwrveGeoSDK 2.3. For example:

iOS

Update your Podfile to use the latest SwrveSDK 6.2 and SwrveGeoSDK 2.3. For example:


iOS Version 2.2.1

To upgrade to v2.2.1 for iOS, update your Podfile to use the latest SwrveGeoSDK 2.2.1 and PointSDK 1.13.3.  For example:


Version 2.2

To upgrade to v2.2:

Android

Update your build.gradle file to use SwrveSDK 6.1 and SwrveGeoSDK 2.2. For example:

iOS

Update your Podfile to use the latest SwrveSDK 6.1 and SwrveGeoSDK 2.2. For example:


Version 2.1.1

To upgrade to v2.1.1:

Android

Update your build.gradle file to use SwrveGeoSDK 2.1.1. For example:

iOS

Update your Podfile to use the latest SwrveGeoSDK 2.1.1. For example:


Version 2.1

To upgrade to v2.1:

Android

  • Update your build.gradle file to use SwrveSDK 6.0.1, SwrveGeoSDK 2.1, and PointSDK 1.13.1. For example:
  • To remove the persistent foreground notification, remove the Notification parameter from the SwrveGeoSDK init methods:
  • To remove the Bluetooth permision, add the following to your AndroidManifest.xml:

iOS

Update your Podfile to use SwrveSDK 6.0.1, SwrveGeoSDK 2.1, and PointSDK 1.13.1. For example:

Delay initial start to allow locations permission request

Android

In your SwrveGeoConfig, set the delayStart configuration to true: geoConfig.setDelayStart(true). You still need to handle the actual permissions request in your own code, but once it’s granted, call SwrveGeoSDK.start.

iOS

In your SwrveGeoConfig, set the delayStart configuration to YES: [geoConfig setDelayStart:YES]  and call [SwrveGeoSDK start] later. If the user hasn’t already authorized location permission, then the permission dialogue will automatically appear.


Android Version 2.0.1

To upgrade to v2.0.1 for Android, update your build.gradle file to use SwrveGeoSDK 2.0.1:


Version 2.0

Swrve Geo version 2.0 has a hard dependency on the native Swrve SDK version 5.3. Ensure you update your app to a minimum of native Swrve SDK 5.3.

To upgrade to v2.0:

Android

  1. Update your build.gradle file to use the latest Swrve SDK (5.3) and SwrveGeoSDK 2.0:
  2. Remove the username parameter from the SwrveGeoSDK init methods:

iOS

  1. Update your podspec file to use the latest Swrve SDK (5.3) and SwrveGeoSDK 2.0:
  2. Remove the username parameter from the [SwrveGeoSDK init] methods:

Custom filtering

To filter notifications or modify their content based on custom properties, you can set a custom filter when initializing the Geo SDK.

Android

iOS