Optimove Unity SDK supports Unity >= 2019.3. Supported platforms are iOS and Android.
In this guide we will discuss the steps to integrate the Optimove Unity SDK with your application.
NOTE: To unlock these capabilities, you will need to have added the relevant OptiMobile channels to your Optimove package. If you can’t see this feature in your Optimove instance, contact your CSM to find out more.
This is a quick start integration guide. For detailed integration instructions refer to the above.
- create a new project
- switch platform: Android
- set package id (Player Settings -> Other Settings)
- import OptimoveSDKUnity package
- add OptimoveInit to MainCamera
- in Player Settings verify (it should be set automatically):
- custom gradle main template set to
Plugins/Android/mainTemplate.gradle
, - custom gradle launcher template set to
Plugins/Android/launcherTemplate.gradle
- custom gradle base template set to
Plugins/Android/baseProjectTemplate.gradle
- custom main manifest set to
Plugins/Android/AndroidManifest.xml
. - for 2020.3+ make sure custom gradle properties template set to
Plugins/Android/gradleTemplate.properties
- custom gradle main template set to
- If using push/ddl uncomment relevant lines in gradle templates and
AndroidManifest.xml
- Create
Assets/OptimoveConfigFiles/optimove.json
, set credentials - If using push push add
google-services.json
toAssets/OptimoveConfigFiles/google-services.json
- (Optional) Export project
- create a new project
- switch platform to ios
- set bundle id (Player Settings -> Other Settings)
- import OptimoveSDKUnity package
- add OptimoveInit to MainCamera
- Create
Assets/OptimoveConfigFiles/optimove.json
, set credentials - Move
Artifacts/OptimoveNativeAssets~
toAssets
folder - build project. Depending on values in
optimove.json
this automatically adds capabilities, NotificationServiceExtension and sets up Xcode project.
- signing (if was not set in Unity Player Settings)
- Switch to New Build System in File -> Project Settings -> Build System (likely already on). This is necessary to use xcframeworks.
Optimove SDK for Unity is available under the MIT license.