AppLovin MAX Flutter Plugin for Android and iOS.
Check out our integration docs here.
See pub.dev for the latest releases of the plugin.
To get started with the demo app, please ensure Flutter is installed on your system. Once everything is properly installed, follow the instructions below to get the demo application up and running.
- Obtain your AppLovin SDK Key from the dashboard here.
- Obtain your Ad Unit IDs from the dashboard here.
- Update the
SDK_KEY
and Ad Unit IDs in themain.dart
file. - Update the package name from
com.applovin.enterprise.apps.demoapp
to one that matches your ad units. Be sure to do this for every package name reference in the demo app.
- Navigate to your Flutter project directory in your file explorer or terminal.
- Within the project directory, navigate to
android/app/
to find thebuild.gradle
file. - Open
build.gradle
with a text editor or an IDE. - Update
applicationId
with your package name.
android {
⋮
defaultConfig {
applicationId "your_package_name"
⋮
}
- Add the necessary adapters for the mediated ad networks you plan to integrate, as specified in the documentation. It will look something like this:
dependencies {
// Other dependencies...
implementation 'com.example.adapter:version'
}
Caution
Do not add the underlying AppLovin SDK to your dependencies. The AppLovin MAX Flutter plugin already specifies the certified SDK version corresponding to the plugin. If you also manually add the dependency, this may break your build and cause unpredictable results.
implementation 'com.applovin:applovin-sdk:+'
- Within the
android/app/
directory, locate and open theAndroidManifest.xml
file. - If the mediated ad network adapter you add requires
meta-data
, insert the necessarymeta-data
elements within the<application>
tag.
- Locate your
Podfile
in the/ios
folder. - Open the
Podfile
with a text editor or IDE. - Add the necessary adapter pods for the mediated networks you're integrating, as specified in the documentation. It will look something like this:
target 'Runner' do
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
pod 'AppLovinMediationExampleAdapter'
end
Caution
Do not add the underlying AppLovin SDK to your dependencies. The AppLovin MAX Flutter plugin already specifies the certified SDK version corresponding to the plugin. If you also manually add the dependency, this may break your build and cause unpredictable results.
pod 'AppLovinSDK'
- After you save the
Podfile
, open a terminal and run the following commands to install the pods:
pod install --repo-update
- In your Flutter project's
ios
folder, find and open theRunner.xcworkspace
file to launch Xcode. - Select the Signing and Capabilities tab and update the Bundle Identifier with your package name, ensuring it matches the package name configured in your AppLovin dashboard.
- Add
NSUserTrackingUsageDescription
to your Information Property List via Xcode or directly editInfo.plist
. This key is necessary so that your app can display the permission prompt for tracking user activity across apps.
- If the mediated ad network adapter you add requires an information property, update
Info.plist
with the necessary key-value pairs.
MIT