This page shows you how to download, import, and configure the AppLovin Flutter plugin.
If you want to receive release updates, subscribe to the AppLovin MAX Flutter plugin GitHub repository.
Download the Latest Plugin
You can download the AppLovin MAX Flutter plugin through pub.dev by entering the following dependency into your pubspec.yaml under dependencies
:
⋮ dependencies: applovin_max: ^1.0.0
You can add that dependency to pubspec.yaml manually, or by issuing the following flutter command:
flutter pub add applovin_max
Install the Plugin
If you added the dependency manually (rather than with the flutter pub add command), issue the following flutter command to install applovin_max:
flutter pub get
(If you added the dependency with the flutter pub add command, this step will take place automatically.)
Import the Plugin
Import the plugin into your Dart code with a statement like the following:
import 'package:applovin_max/applovin_max.dart';
Initialize the SDK
Add the code snippet below into your app’s main home screen:
import 'package:applovin_max/applovin_max.dart'; ⋮ Map? sdkConfiguration = await AppLovinMAX.initialize(sdk-key); // SDK is initialized, start loading ads
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. Therefore, always initialize the AppLovin SDK on startup so as to give mediated networks the maximum amount of time to cache ads. This is especially important with video ads.
Do not use different network app IDs for the same network across different ad units. If you use different app IDs for the same network and app package name without using selective init you will break the network initialization process.
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. To leverage the MAX Global SKAdNetwork Report, enable iOS 15 SKAdNetwork reporting by using the app’s Info.plist:
- In your app’s Info.plist, create a new key named
NSAdvertisingAttributionReportEndpoint
of typeString
. - Give that key the value:
https://postbacks-app.com
.
You can check the value of your app’s SKAdNetwork endpoint by using the Mediation Debugger.
To forward the SKAdNetwork postbacks to one or more third-party endpoints of your choice, please contact your account team. Note that independent of this Apple feature, AppLovin automatically sends a copy of all SKAdNetwork postbacks to the relevant campaign attribution MMP.