Integration
This page shows you how to download, import, and configure the AppLovin MAX Unity Plugin.
Download the Latest Unity Plugin
Download the plugin manually by using this button:
To receive release updates, subscribe to the AppLovin MAX Unity Plugin GitHub repository.
Import the Plugin into Unity
Take the following steps to import the plugin you downloaded:
- In Unity, select Assets > Import Package > Custom Package…
- Choose the Unity Plugin file you downloaded.
- In the Import Unity Package dialog, click Import.
Requirements
- Unity 2018.2 or later.
- For Android builds, the AppLovin MAX plugin requires that you enable Jetifier.
To enable Jetifier, take the following steps:
- In Unity, select Assets > External Dependency Manager > Android Resolver > Settings.
- In the Android Resolver Settings dialog that appears, check Use Jetifier.
- Click OK.
- For iOS builds:
- Building with bitcode is no longer supported. Apple deprecated Bitcode in Xcode 14.
- The AppLovin MAX plugin requires CocoaPods. Install CocoaPods by following the instructions at the CocoaPods Getting Started guide.
- Call all AppLovin MAX APIs on the main thread.
Integrate Custom SDK Adapters
AppLovin Exchange (ALX) supports a custom adapter for LinkedIn. Integration instructions are below and more information can be found here.
You can install the adapter through the AppLovin Unity Plugin’s Integration Manager. In Unity, select AppLovin > Integration Manager, then press the Install button for the LinkedIn adapter under AppLovin Micro SDK Partners.
Enable Ad Review
To enable the MAX Ad Review service, add your AppLovin SDK Key in the AppLovin Integration Manager:
- In Unity, select AppLovin > Integration Manager. The AppLovin Integration Manager dialog appears.
- Check Enable MAX Ad Review and type your SDK Key in the field labeled AppLovin SDK Key.
- Close the AppLovin Integration Manager dialog.
You can find your SDK key in the Account > General > Keys section of the AppLovin dashboard.
Initialize the SDK
Attach the OnSdkInitializedEvent
event handler, then set the SDK key and initialize the SDK as soon as your app launches.
The following code sample demonstrates this:
You can find your SDK key in the Account > General > Keys section of the AppLovin dashboard.
Ad assets that are fully cached result in a better user experience. For this reason, always initialize the AppLovin SDK on startup. This gives mediated networks the maximum amount of time to cache ads. This is especially important with video ads.
iOS 14 Support
In iOS 14, Apple introduced global privacy changes that you need to comply with. This section explains how to comply with these changes and thereby avoid a material drop in revenue.
SKAdNetwork
The Unity Plugin automatically updates your app’s Info.plist
with network-specific identifiers.
MAX Terms & Privacy Policy Flow
Implement the MAX Terms & Privacy Policy Flow to integrate compliance with the ATT framework and acceptance of your Terms of Service and Privacy Policy.
Consent and Data APIs
You must obtain consent from your users (in applicable jurisdictions) on behalf of AppLovin’s monetization partners. Then you must correctly pass consent flag values to AppLovin. To learn how to do this, review the Privacy–Consent and Data APIs documentation.
iOS 15 Global SKAdNetwork Reporting
Starting with iOS 15, Apple allows developers to send a copy of their SKAdNetwork install postbacks to an endpoint of their choice. MAX provides a Global SKAdNetwork Report (MAX > Mediation > Analyze > Global SKA Report) for developers to access the SKAdNetwork data across all their network partners in one place.
This feature is available to you in the MAX Unity plugin, starting with version 4.3.8. If you would like to enable this feature, you can do so in the AppLovin Integration Manager by following these instructions:
- In Unity, select AppLovin > Integration Manager. The AppLovin Integration Manager dialog appears.
- Check the Set Advertising Attribution Report Endpoint in Info.plist setting under Other Settings.
- Close the AppLovin Integration Manager dialog.