Unity SDK 5.1.0

Release notes, improvements, documentation, and examples.

Mobile Native SDKs

Android SDK 7.1.2
iOS SDK 6.0.5

Features

The In-App decision handlers, released with Unity SDK v5.0.0, are invoked by the native iOS/Android SDKs and highly depend on the client's implementation in Unity. Hence, we have introduced an optimized code version allowing developers to decide whether to use them from a worker thread.

In v5.0.0, the thread that runs the handlers is not strictly specified. In v5.1.0, you may specify in the SDK for Unity to run all your decision handlers in a worker thread. To enable the worker thread, execute the following code before Leanplum.start():

Leanplum.SetActionManagerUseAsyncHandlers(true);

Bugfixes

The invocation of LeanplumActivityHelper.enableLifecycleCallbacks(context) method from UnityBridge.java has been removed, and you must call it yourself. Ensure you comply with the following:

🚧

Android Application

It is mandatory to invoke LeanplumActivityHelper.enableLifecycleCallbacks(context) at the earliest possible moment, i.e., in the Application.onCreate method. It would allow the IAM Handlers mechanism to work properly. We made it easier by providing the LeanplumUnityApplication class that is registered in the manifest. However, if you have a custom Application class, you must call LeanplumActivityHelper.enableLifecycleCallbacks(this) in the Application.onCreate method.