Last modified October 21, 2020 by Shelly Wolfe

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 7.2.0

If you are upgrading from a version prior to 7.0.0, see below. Otherwise, there are no code changes required to upgrade to Swrve Unity SDK v7.2.0.

Firebase Instance ID exceptions

The Firebase messaging library now validates your google-services.json file and throws an IllegalArgumentException if problems are found. If you see this exception in Logcat, then refresh your google-services.json file from the Firebase console or else regenerate your Push Android Library making sure the project_id is in file src/main/res/values/values.xml.


Version 7.1.0

If you are upgrading from a version prior to 7.0.0, see below. Otherwise, there are no code changes required to upgrade to Swrve Unity SDK v7.1.0.


Version 7.0.2

If you are upgrading from a version prior to 7.0.0, see below. Otherwise, there are no code changes required to upgrade to Swrve Unity SDK v7.0.2.


Version 7.0.1

If you are upgrading from a version prior to 7.0.0, see below. Otherwise, there are no code changes required to upgrade to Swrve Unity SDK v7.0.1.


Version 7.0.0

This section provides information for upgrading to Swrve Unity SDK v7.0.0.

Removed Summary
SetConversationVersion(int) We no longer support directly changing the conversation version that your instance is expecting. We will always set the latest conversation version that the current SDK supports.
Changed
config.AndroidPushNotificationAccentColor to config.AndroidPushNotificationAccentColorHex Changed the notification accent color configuration from RGB to Hex.

AndroidX

We have migrated the Android Native plugin from android-support over to AndroidX. For more information please see Android’s Migrating to AndroidX guide.

Firebase Cloud Messaging library update

We’ve updated Firebase Cloud Messaging to version 20.0.1 and dropped support for Android 14 and 15. When upgrading to Swrve Unity SDK 7.0 please ensure your minimum Android support is at 16.

Delayed initialization and custom user ID

For information about how to configure the SDK to delay initialization and set a custom user ID for tracking purposes, see the Unity integration guide.


Version 6.2.0 and 5.2.0

If you are upgrading from a version prior to 6.0.0, see below. Otherwise, there are no code changes required to upgrade to Swrve Unity SDK v6.2.0 and v5.2.0.


Version 6.1.0

If you are upgrading from a version prior to 6.0.0, see below. Otherwise, there are no code changes required to upgrade to Swrve Unity SDK v6.1.0.


Version 6.0.0

This section provides information for upgrading to Swrve Unity SDK v6.0.0.

Removed Summary
Init (MonoBehaviour container, int appId, string apiKey, string userId) We no longer support directly editing the Swrve user ID when initializing the SDK. To set a custom user ID, use our new Identify API call. For more information, see Unity integration guide.
Init (MonoBehaviour container, int appId, string apiKey, string userId, SwrveConfig config) We no longer support directly editing the Swrve user ID when initializing the SDK. To set a custom user ID, use our new Identify API call. For more information, see Unity integration guide.
userId property from SwrveConfig To set a custom user ID, use our new Identify API call. For more information, see Unity integration guide.
HTTP/HTTPS configuration from SwrveConfig The SDK now only supports HTTPS protocol for all requests to and from it.
AndroidPushNotificationTitle from SwrveConfig Removed the configuration of an Android push notification title from the SwrveConfig.

Authenticated push

If you want to use our new user identity authenticated push feature, ensure you configure your app to use silent notifications. For information on how to configure silent notifications, see the Unity integration guide.


Previous versions

If you are upgrading from a version older than 6.0.0, please refer to the Unity integration guide.