TUNE recommends creating both PROD and DEBUG apps in our system. You can switch between builds automatically by using debug macros. Create separate App IDs for the development and production builds of your app so that changes to your development build do not affect your production build (until you’re ready to push them to your production app audience).
You need to have two apps in In-App Marketing for each one of your apps if you support two platforms. One platform is for production and one for development.
For more information about creating unique App IDs/package names, please visit Creating Unique Package Names.
Important Note: Based on your platform, SDK initialization is necessary in the Native app code for Unity initialization. For iOS this is the Delegate class, for Android this is the Application class.
- Implement version 4.0+ of the Unity plugin from Github.
- Make Python 2.7 available from your command line, our build scripts will use this.
- In Unity, click TUNE -> Setup from the context menu and open the In-App Marketing dropdown.
- Enter your TUNE advertiser id, conversion key, and package name.
Enabling In-App Marketing for Unity Android
Unity Android integration requires the app to implement a custom Application class which extends TuneApplication in order to hook into the application lifecycle. You may auto-generate this from the editor.
Important Note: Make sure you complete each of the following three steps:
- Select the Create Application Java File button to generate the .java file which initializes Tune with your advertiser id, conversion key, and package name and In-App Marketing enabled.
- Compile this .java file into a JAR in order for Unity to use. Enter the Android API level you wish to compile the JAR with, then click Generate Application Jar.
- Tell the app to use this custom Application class. Add a reference to it in /Plugins/Android/AndroidManifest.xml.
Enabling In-App Marketing for Unity iOS
Unity iOS integration requires the app to implement a custom AppDelegate class which inherits Unity’s LifeCycleListener in order to hook into the application lifecycle. You may auto-generate this from the editor.
Important Note: Make sure you complete both of the following two steps:
- Populate the checkbox to enable In-App Marketing for iOS. This allows the post-build processing script to modify the generated Xcode project correctly to support In-App Marketing.
- Create a custom class which inherits LifeCycleListener. Auto-generate this from the editor. Click the Create LifeCycleListener File button to generate the .mm file which initializes Tune with your advertiser id, conversion key, and package name.
Set Up Push Notifications
Across all platforms, it is important to establish push notifications after your initial SDK install.
For more information on how to set up push notifications and configure campaigns to send out targeted push messages, see Push Notifications.