Last modified November 22, 2014 by Gordon Glauser

Unity SDK Upgrade Guide

This guide provides information about how you can upgrade to the latest Swrve Unity SDK. For information about the changes that have been made in each Unity SDK release, see Unity SDK Release Notes.

Version 5.1.3

No code changes are required to upgrade to Swrve Unity SDK v5.1.3. If you are upgrading from a version prior to 5.1.2, please check the previous upgrade instructions.


Version 5.1.2

This section provides information to enable you to upgrade to Swrve Unity SDK v5.1.2. If you are upgrading from a version prior to 5.1, also see the Unity SDK 5.0+ Upgrade Guide.

Custom buttons in rich push notifications

To ensure custom buttons in rich push notifications work correctly, use the SwrveUnityApplication as your main Unity Android application by adding it to Plugins/Android/AndroidManifest.xml as follows (for more information about AndroidManifest.xml on Unity, see the Unity documentation for Android Manifest):

Alternatively, you can call the following method from your custom Application class inside the onCreate method:


Version 5.1.1

No code changes are required to upgrade to Swrve Unity SDK v5.1.1. If you are upgrading from a version prior to 5.1, see the Unity SDK 5.0+ Upgrade Guide.


Version 5.1

This section provides information to enable you to upgrade to Swrve Unity SDK v5.1.

API Changes

With the release of Swrve’s Unity SDK version 5.1, we have made major changes to the APIs to ensure internal consistency and improve SDK integration. For a complete list of the changes you need to make, see the Unity SDK 5.0+ Upgrade Guide.

Rich Push Notifications for iOS

Ensure that your are setting an App Group Identifier to the key iOSAppGroupIdentifier to your postprocess.json.

Custom Android Manifest

Create or modify your AndroidManifest.xml file so the SDK native code is called on Application launch by setting a custom Application class:


Version 4.11

This section provides information to enable you to upgrade to Swrve Unity SDK v4.11.

Rich Push Notifications for iOS

Ensure that your PlayerSettings.applicationIdentifier and PlayerSettings.appleDeveloperTeamID is set in your Unity Project. These are used to construct the new app service extension required for rendering rich media in push notifications. For more information, please see the Notification Service Extension for Swrve Rich Push section in the Unity Integration Guide.

Tracking Influenced Users

For iOS, you need to add an App Group Identifier to the key iOSAppGroupIdentifier to your postprocess.json. For more information, see the Unity Integration Guide.

Default Android O Channel

The Swrve Unity SDK now includes a default Android O channel to display your notifications. You can configure this default channel via the SwrveConfig before initialization:

config.DefaultAndroidChannel = new AndroidChannel(“id”, “name”, AndroidChannel.ImportanceLevel.Default);


Version 4.10.1

No code changes are required to upgrade to Swrve Unity SDK v4.10.1.


Version 4.10

This section provides information to enable you to upgrade to Swrve Unity SDK v4.10.

Silent Push Notifications

To enable silent push notifications, complete the steps outlined under Configuring Silent Notifications in the Unity Integration Guide.


Version 4.9.2

No code changes are required to upgrade to Swrve Unity SDK v4.9.2.


Version 4.9.1

No code changes are required to upgrade to Swrve Unity SDK v4.9.1.


Version 4.9

This section provides information to enable you to upgrade to Swrve Unity SDK v4.9.

SIM Information

If you want to keep sending the SIM information out-of-the-box, make sure to add the android.permission.READ_PHONE_STATE to your Android build.


Version 4.8

This section provides information to enable you to upgrade to Swrve Unity SDK v4.8.

Advertising Identifier (IFDA) Logging

IDFA logging is now disabled by default. If you want to continue logging IDFA, add the SWRVE_LOG_IDFA flag to your project settings as shown in the Unity documentation, Platform Dependent Compilation.


Previous Versions

If you are upgrading from a version older than 4.8, please refer to the Unity SDK 5.0 Upgrade Guide and Unity Integration Guide.