Unity Mediation
Unity Mediation plugin for Flutter Applications. This plugin is able to display Rewarded and Interstitial Ads from different ad sources.
If your application uses only ads from Unity Ads source use Unity Ads Plugin.
Getting Started
1. Configure
iOS
- set iOS version to 9.0 or higher in
ios/Podfile
file - in
ios/Podfile
file add next lines afterplatform :ios
line:
source 'https://github.com/CocoaPods/Specs.git'
source 'https://github.com/Unity-Technologies/unity-mediation-cocoapods-prod.git'
Android
- set
minSdkVersion
to 21 inandroid/app/build.gradle
file
2. Configure ad sources
For using additional advertising sources, it’s needed to configure them.
iOS
Add dependencies of configured ad sources to ios/Podfile
file from the table below
target 'Runner' do
use_frameworks!
use_modular_headers!
# list of adapters
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end
AdMob ad source requires additional configuration. If you use AdMob add your AdMob app ID to ios/Runner/Info.plist
file
dependencies {
// list of adapters
}
AdMob ad source requires additional configuration. If you use AdMob add your AdMob app ID to android/app/src/main/AndroidManifest.xml
file
Ad Sources
Source | iOS | Android |
---|---|---|
AdColony | pod 'UnityMediationAdColonyAdapter' |
implementation "com.unity3d.mediation:adcolony-adapter:0.3.0" |
AppLovin | pod 'UnityMediationAppLovinAdapter' |
implementation "com.unity3d.mediation:applovin-adapter:0.3.0" |
IronSource | pod 'UnityMediationIronSourceAdapter' |
implementation "com.unity3d.mediation:ironsource-adapter:0.3.0" |
Vungle | pod 'UnityMediationVungleAdapter' |
implementation "com.unity3d.mediation:vungle-adapter:0.3.0" |
Meta Audience Network | pod 'UnityMediationFacebookAdapter' |
implementation "com.unity3d.mediation:facebook-adapter:0.3.0" |
AdMob | pod 'UnityMediationAdmobAdapter' |
implementation "com.unity3d.mediation:admob-adapter:0.3.0" |
3. Initialization
Initialize Unity Mediation with your game ID
4. Rewarded Ad
Load an ad before show it.
Show a loaded rewarded ad.
5. Interstitial Ad
Load an ad before show it.
Show a loaded interstitial ad.
Donate
If you found this plugin helpful and would like to thank me: