연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.
Appodeal Flutter
Official Appodeal Flutter Plugin for your Flutter application.
Appodeal SDK 4.3.0
-
Google CMP and TCF v2 Support
- To enhance the relevance of ads for your users and comply with regulations like GDPR and CCPA,
explicit user consent is required for collecting personal data.
- We recommend using the Stack Consent Manager, built on Google User Messaging Platform (UMP),
as a ready-made solution to obtain user consent.
- Follow this instruction to
configure Google UMP and set up a consent form.
- If you have questions about Stack Consent Manager and Google UMP, please contact our support team.
-
AdMob Bidding Support
- Download our newest version of AdMob Sync tool from this page and perform a sync.
- Read more about AdMob Sync in our guide.
-
Already included ready-made consent solution
- Starting from Appodeal SDK 3.0, during the first initialization, a ready-made consent window will be shown if the user is in regions
covered by GDPR and CCPA. See more about this behavior
-
Support Monetization + UA + Analytics data services
- Get insights and find out if your active UA campaigns bring you revenue or make you lose money.
- Track your metrics with Firebase Keywords. Analyze how product A/B test (via Firebase remote config) affects both
your product and monetization. See more about services
Table of Contents
Installation
Add the dependency to the pubspec.yaml file in your project:
dependencies:
stack_appodeal_flutter: 4.3.0
Install the plugin by running the command below in the terminal:
$ flutter pub get
iOS
[!IMPORTANT]
- iOS 15.0 or higher for using the Appodeal Flutter plugin.
- Appodeal SDK is compatible with both ARC and non-ARC projects.
- Use Xcode 15.3 or higher. Xcode 27 and iOS 27 are supported starting from 4.3.0.
- Go to
ios/ folder and open Podfile
- Add Appodeal adapters. Add pods into
./ios/Podfile:
platform :ios, '15.0'
source 'https://github.com/appodeal/CocoaPods.git'
source 'https://github.com/bidon-io/CocoaPods-Specs.git'
source 'https://cdn.cocoapods.org'
use_frameworks!
def appodeal
pod 'Appodeal', '4.3.0'
# Level Play
pod 'IronSourceAdMobAdapter', '5.10.0.0'
pod 'IronSourceBidMachineAdapter', '5.7.0.0'
pod 'IronSourceBigoAdapter', '5.9.0.0'
pod 'IronSourceFacebookAdapter', '5.3.0.0'
pod 'IronSourceFyberAdapter', '5.8.0.0'
pod 'IronSourceInMobiAdapter', '5.7.0.0'
pod 'IronSourceMintegralAdapter', '5.13.0.0'
pod 'IronSourceMobileFuseAdapter', '5.0.0.0'
pod 'IronSourceMolocoAdapter', '5.5.0.0'
pod 'IronSourceMyTargetAdapter', '5.9.0.0'
pod 'IronSourceOguryAdapter', '5.0.0.0'
pod 'IronSourcePangleAdapter', '5.5.0.0'
pod 'IronSourceSmaatoAdapter', '5.3.0.0'
pod 'IronSourceUnityAdsAdapter', '5.6.0.0'
pod 'IronSourceVerveAdapter', '5.1.0.0'
pod 'IronSourceVungleAdapter', '5.9.0.0'
pod 'IronSourceYandexAdapter', '5.7.0.0'
# Bidon
pod 'BidonAdapterAmazon', '5.5.0.0'
pod 'BidonAdapterAppLovin', '13.6.4.0'
pod 'BidonAdapterBidMachine', '3.7.1.1'
pod 'BidonAdapterBigoAds', '5.2.1.0'
pod 'BidonAdapterChartboost', '9.10.1.0'
pod 'BidonAdapterDTExchange', '8.4.7.0'
pod 'BidonAdapterInMobi', '11.3.0.0'
pod 'BidonAdapterIronSource', '9.4.0.0.0'
pod 'BidonAdapterMetaAudienceNetwork', '6.21.1.1'
pod 'BidonAdapterMintegral', '8.1.3.0'
pod 'BidonAdapterMobileFuse', '1.9.3.0'
pod 'BidonAdapterMoloco', '4.3.0.0'
pod 'BidonAdapterMyTarget', '5.43.0.0'
pod 'BidonAdapterStartIo', '4.11.0.0'
pod 'BidonAdapterTaurusX', '1.9.2.0'
pod 'BidonAdapterUnityAds', '4.17.0.0'
pod 'BidonAdapterVungle', '7.7.3.0'
pod 'BidonAdapterYandex', '7.18.4.0'
pod 'BidonAdapterZmaticoo', '2.2.0.0'
# Appodeal
pod 'AppodealAdjustAdapter', '5.7.0.1'
pod 'AppodealAmazonAdapter', '5.5.0.0'
pod 'AppodealAppLovinAdapter', '13.6.4.0'
pod 'AppodealAppLovinMAXAdapter', '13.6.4.2'
pod 'AppodealAppsFlyerAdapter', '6.18.0.2'
pod 'AppodealBidMachineAdapter', '3.7.1.0'
pod 'AppodealBidonAdapter', '0.15.0.0'
pod 'AppodealBigoAdsAdapter', '5.2.1.0'
pod 'AppodealDTExchangeAdapter', '8.4.7.0'
pod 'AppodealFacebookAdapter', '18.0.3.0'
pod 'AppodealFirebaseAdapter', '12.15.0.1'
pod 'AppodealGoogleAdMobAdapter', '13.5.0.0'
pod 'AppodealIABAdapter', '3.5.2.0'
pod 'AppodealInMobiAdapter', '11.3.0.0'
pod 'AppodealIronSourceAdapter', '9.4.0.0.0'
pod 'AppodealLevelPlayAdapter', '9.4.0.0.0'
pod 'AppodealMetaAudienceNetworkAdapter', '6.21.1.0'
pod 'AppodealMintegralAdapter', '8.1.3.0'
pod 'AppodealMyTargetAdapter', '5.43.0.0'
pod 'AppodealSentryAdapter', '8.57.2.1'
pod 'AppodealUnityAdapter', '4.17.0.0'
pod 'AppodealVungleAdapter', '7.7.3.0'
pod 'AppodealYandexAdapter', '7.18.4.1'
# AppLovin MAX
pod 'AppLovinMediationAmazonAdMarketplaceAdapter', '5.5.0.0'
pod 'AppLovinMediationBidMachineAdapter', '3.7.1.0.0'
pod 'AppLovinMediationBigoAdsAdapter', '5.2.1.0'
pod 'AppLovinMediationByteDanceAdapter', '7.7.0.7.0'
pod 'AppLovinMediationChartboostAdapter', '9.10.1.0'
pod 'AppLovinMediationFacebookAdapter', '6.21.1.0'
pod 'AppLovinMediationFyberAdapter', '8.4.7.0'
pod 'AppLovinMediationGoogleAdManagerAdapter', '13.5.0.0'
pod 'AppLovinMediationGoogleAdapter', '13.5.0.0'
pod 'AppLovinMediationInMobiAdapter', '11.3.0.1'
pod 'AppLovinMediationIronSourceAdapter', '9.4.0.0.0'
pod 'AppLovinMediationMintegralAdapter', '8.1.3.0.0'
pod 'AppLovinMediationMobileFuseAdapter', '1.9.3.0'
pod 'AppLovinMediationMolocoAdapter', '4.3.0.0'
pod 'AppLovinMediationOguryPresageAdapter', '5.1.1.0'
pod 'AppLovinMediationPubMaticAdapter', '4.10.0.0'
pod 'AppLovinMediationSmaatoAdapter', '23.2.0.0'
pod 'AppLovinMediationUnityAdsAdapter', '4.17.0.0'
pod 'AppLovinMediationVerveAdapter', '3.7.0.0'
pod 'AppLovinMediationVungleAdapter', '7.7.3.0'
pod 'AppLovinMediationYandexAdapter', '7.18.4.0'
pod 'TaurusxAdsSDK', '1.9.2'
pod 'TaurusxAdsSDK/AppLovinAdapter', '1.9.2'
pod 'zMaticooMAXAdapter', '2.2.0'
end
target 'Sample' do
project 'Sample/Sample.xcodeproj'
appodeal
use_modular_headers!
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end
[!TIP]
Use the Appodeal Dependencies Wizard to configure mediated networks and generate an always up-to-date dependency list for your Podfile.
Note: Appodeal requires to use use_frameworks!. You need to remove Flipper dependency from Podfile and AppDelegate.
[!NOTE]
The Appodeal dependency list pulls pods from three sources (appodeal, bidon-io, cdn.cocoapods.org). Because some pods are published in more than one of them, CocoaPods prints a Found multiple specifications warning for each. Add the following to the top of your Podfile to silence those warnings and speed up project generation on this large dependency graph:
install! 'cocoapods',
:deterministic_uuids => false,
:warn_for_multiple_pod_sources => false
- Call
pod install
- Open
.xcworkspace
- Configure
Info.plist.
SKAdNetworkIds
Ad networks used in Appodeal mediation support conversion tracking using Apple's SKAdNetwork,
which means ad networks are able to attribute an app install even when IDFA is unavailable. To
enable this functionality, you will need to update the SKAdNetworkItems key with an additional
dictionary in your Info.plist.
The up-to-date list of SKAdNetworkIds is available in the official documentation.
App Transport Security
In order to serve ads, the SDK requires you to allow arbitrary loads. Set up the following keys
in Info.plist of your app:
- Go to your Info.plist file, then press Add+ anywhere in the first column of the key list.
- Add App Transport Security Settings key and set its type to Dictionary in the second
column.
- Press Add+ at the end of the name App Transport Security Settings key and choose Allow
Arbitrary loads. Set its type to Boolean and its value to Yes.
There is App Transport Security settings in Info.plist format
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
Other feature usage descriptions
All of the entries below are optional. None of them is required by the Appodeal SDK itself —
add only the ones that match the networks you actually integrate and the permissions you are
willing to request.
- NSUserTrackingUsageDescription - Starting from iOS 14, reading the IDFA requires permission
from the user. Add this entry if you call the App Tracking Transparency prompt (see
App Tracking Transparency). Without the IDFA, ad revenue is
typically lower, so this is the one entry we do recommend adding.
- NSLocationWhenInUseUsageDescription - Not needed for Appodeal. The Appodeal SDK does not
link
CoreLocation and never requests location. Add this entry only if you integrate a network
that uses location — in the current recommended set that is Amazon
(AppodealAmazonAdapter, BidonAdapterAmazon) and BidMachine (AppodealBidMachineAdapter).
If you do not use those, omit it.
- NSCalendarsUsageDescription - Not needed for Appodeal. Requested by some ad networks for
"add to calendar" creatives. Omit it unless a network you integrate requires it.
There is Other feature usage descriptions settings in Info.plist format
Add only the keys you need — see the notes above.
<key>NSUserTrackingUsageDescription</key>
<string><App Name> needs your advertising identifier to provide personalised advertising experience tailored to you</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string><App Name> needs your location for analytics and advertising purposes</string>
<key>NSCalendarsUsageDescription</key>
<string><App Name> needs your calendar to provide personalised advertising experience tailored to you</string>
- Build your project
Android
[!IMPORTANT]
- Android API level 24 (Android OS 7.0) or higher.
- Add Appodeal adapters.
Add dependencies into build.gradle (module: app)
dependencies {
implementation "com.appodeal.ads.sdk:core:4.3.0"
// BidMachine
implementation "io.bidmachine:ads.networks.amazon:12.0.0.0"
implementation "io.bidmachine:ads.networks.meta_audience:6.21.0.1"
implementation "io.bidmachine:ads.networks.mintegral:17.1.61.1"
implementation "io.bidmachine:ads.networks.my_target:5.47.1.2"
implementation "io.bidmachine:ads.networks.vungle:7.7.4.0"
// AppLovin MAX
implementation "com.applovin.mediation:amazon-tam-adapter:11.3.1.0"
implementation "com.applovin.mediation:bidmachine-adapter:3.7.1.0"
implementation "com.applovin.mediation:bigoads-adapter:5.9.0.0"
implementation "com.applovin.mediation:bytedance-adapter:8.1.0.3.0"
implementation "com.applovin.mediation:chartboost-adapter:9.10.2.0"
implementation "com.applovin.mediation:facebook-adapter:6.21.0.0"
implementation "com.applovin.mediation:fyber-adapter:8.4.6.0"
implementation "com.applovin.mediation:google-ad-manager-adapter:25.2.0.0"
implementation "com.applovin.mediation:google-adapter:25.2.0.0"
implementation "com.applovin.mediation:inmobi-adapter:11.3.0.1"
implementation "com.applovin.mediation:ironsource-adapter:9.4.4.0.0"
implementation "com.applovin.mediation:mintegral-adapter:17.1.61.0"
implementation "com.applovin.mediation:mobilefuse-adapter:1.11.0.0"
implementation "com.applovin.mediation:moloco-adapter:4.3.1.0"
implementation "com.applovin.mediation:ogury-presage-adapter:6.2.0.0"
implementation "com.applovin.mediation:pubmatic-adapter:4.10.0.0"
implementation "com.applovin.mediation:smaato-adapter:22.7.2.3"
implementation "com.applovin.mediation:unityads-adapter:4.17.0.0"
implementation "com.applovin.mediation:verve-adapter:3.7.1.0"
implementation "com.applovin.mediation:vungle-adapter:7.7.4.0"
implementation "com.applovin.mediation:yandex-adapter:7.17.0.0"
// Bidon
implementation "org.bidon:amazon-adapter:12.0.0.0"
implementation "org.bidon:applovin-adapter:13.6.3.0"
implementation "org.bidon:bidmachine-adapter:3.7.1.1"
implementation "org.bidon:bigoads-adapter:5.9.0.0"
implementation "org.bidon:chartboost-adapter:9.10.2.0"
implementation "org.bidon:dtexchange-adapter:8.4.6.0"
implementation "org.bidon:inmobi-adapter:11.3.0.0"
implementation "org.bidon:ironsource-adapter:9.4.4.0"
implementation "org.bidon:meta-adapter:6.21.0.0"
implementation "org.bidon:mintegral-adapter:17.1.61.0"
implementation "org.bidon:mobilefuse-adapter:1.11.0.0"
implementation "org.bidon:moloco-adapter:4.3.1.0"
implementation "org.bidon:startio-adapter:5.2.4.1"
implementation "org.bidon:taurusx-adapter:1.12.2.0"
implementation "org.bidon:unityads-adapter:4.17.0.0"
implementation "org.bidon:vkads-adapter:5.47.1.0"
implementation "org.bidon:vungle-adapter:7.7.4.0"
implementation "org.bidon:yandex-adapter:7.17.0.0"
implementation "org.bidon:zmaticoo-adapter:2.0.7.1.0"
// Level Play
implementation "com.unity3d.ads-mediation:admob-adapter:5.7.0"
implementation "com.unity3d.ads-mediation:applovin-adapter:5.8.0"
implementation "com.unity3d.ads-mediation:bidmachine-adapter:5.7.0"
implementation "com.unity3d.ads-mediation:bigo-adapter:5.8.0"
implementation "com.unity3d.ads-mediation:facebook-adapter:5.3.0"
implementation "com.unity3d.ads-mediation:fyber-adapter:5.9.0"
implementation "com.unity3d.ads-mediation:inmobi-adapter:5.7.0"
implementation "com.unity3d.ads-mediation:mintegral-adapter:5.18.0"
implementation "com.unity3d.ads-mediation:mobilefuse-adapter:5.3.0"
implementation "com.unity3d.ads-mediation:moloco-adapter:5.6.0"
implementation "com.unity3d.ads-mediation:mytarget-adapter:5.5.0"
implementation "com.unity3d.ads-mediation:ogury-adapter:5.2.0"
implementation "com.unity3d.ads-mediation:pangle-adapter:5.18.0"
implementation "com.unity3d.ads-mediation:unityads-adapter:5.6.0"
implementation "com.unity3d.ads-mediation:verve-adapter:5.2.0"
implementation "com.unity3d.ads-mediation:vungle-adapter:5.10.0"
// Appodeal
implementation "com.appodeal.ads.sdk.adapters:adjust:5.7.0.0"
implementation "com.appodeal.ads.sdk.adapters:admob:25.2.0.0"
implementation "com.appodeal.ads.sdk.adapters:amazon:12.0.0.0"
implementation "com.appodeal.ads.sdk.adapters:applovin:13.6.3.0"
implementation "com.appodeal.ads.sdk.adapters:applovin_max:13.6.3.1"
implementation "com.appodeal.ads.sdk.adapters:appsflyer:6.18.0.1"
implementation "com.appodeal.ads.sdk.adapters:bidmachine:3.7.1.0"
implementation "com.appodeal.ads.sdk.adapters:bidon:0.14.0.0"
implementation "com.appodeal.ads.sdk.adapters:bigo_ads:5.9.0.0"
implementation "com.appodeal.ads.sdk.adapters:chartboost:9.10.2.0"
implementation "com.appodeal.ads.sdk.adapters:dt_exchange:8.4.6.0"
implementation "com.appodeal.ads.sdk.adapters:facebook_analytics:18.3.0.0"
implementation "com.appodeal.ads.sdk.adapters:firebase:23.2.0.0"
implementation "com.appodeal.ads.sdk.adapters:iab:1.8.1.0"
implementation "com.appodeal.ads.sdk.adapters:inmobi:11.3.0.0"
implementation "com.appodeal.ads.sdk.adapters:ironsource:9.4.4.0"
implementation "com.appodeal.ads.sdk.adapters:level_play:9.4.4.0"
implementation "com.appodeal.ads.sdk.adapters:meta:6.21.0.0"
implementation "com.appodeal.ads.sdk.adapters:mintegral:17.1.61.0"
implementation "com.appodeal.ads.sdk.adapters:mobilefuse:1.11.0.0"
implementation "com.appodeal.ads.sdk.adapters:moloco:4.3.1.0"
implementation "com.appodeal.ads.sdk.adapters:my_target:5.47.1.0"
implementation "com.appodeal.ads.sdk.adapters:ogury:6.2.0.0"
implementation "com.appodeal.ads.sdk.adapters:pubmatic:4.10.0.0"
implementation "com.appodeal.ads.sdk.adapters:sentry_analytics:8.44.1.0"
implementation "com.appodeal.ads.sdk.adapters:smaato:22.7.2.0"
implementation "com.appodeal.ads.sdk.adapters:startio:5.2.4.0"
implementation "com.appodeal.ads.sdk.adapters:taurusx:1.12.2.0"
implementation "com.appodeal.ads.sdk.adapters:unity_ads:4.17.0.0"
implementation "com.appodeal.ads.sdk.adapters:verve:3.7.1.0"
implementation "com.appodeal.ads.sdk.adapters:vungle:7.7.4.0"
implementation "com.appodeal.ads.sdk.adapters:yandex:7.17.0.0"
}
Add repository into build.gradle (module: project)
allprojects {
repositories {
...
maven { url "https://artifactory.appodeal.com/appodeal" }
...
}
}
[!TIP]
Starting from Appodeal SDK 4.1.0, Android uses individual adapter dependencies (same approach as iOS).
Use the Appodeal Dependencies Wizard to configure mediated networks and generate an always up-to-date dependency list for your build.gradle.
- Build your project
AdMob configuration
[!WARNING]
AdMob Bidding is now available since Appodeal SDK 3.2.0.
Don't forget to download our newest version of AdMob Sync tool from this page and perform sync.
You can read more about AdMob Sync in
our guide.
-
How to add AdMob Ad Network to your project:
Add your AdMob app id to meta-data tag:
<manifest>
<application>
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="ca-app-pub-xxxxxxxxxxxxxxxx~yyyyyyyyyy"/>
</application>
</manifest>
Add your AdMob app id to Info.plist.
Use the key GADApplicationIdentifier with the value being your AdMob app ID:
<key>GADApplicationIdentifier</key>
<string>YOUR_ADMOB_APP_ID</string>
-
How to remove AdMob Ad Network from your project:
Change next dependencies into build.gradle (module: app)
Starting from Appodeal SDK 4.1.0, dependencies are added individually.
Simply do not include AdMob-related adapters in your build.gradle / Podfile.
Use the Dependencies Wizard to generate the correct dependency list without AdMob.
Services
Please, read iOS and Android docs at wiki to get deeper understanding how
Appodeal SDK Services works.
Appodeal SDK supports the following services: Adjust, AppsFlyer, Firebase, and Meta.
To add service adapters to your project, use the Dependencies Wizard:
Tracking In-App Purchases
Note: In-App purchase tracking will work only with connection with Adjust/Appsflyer.
It's possible to track in-app purchase information and send info to Appodeal servers for analytics. It allows to group
users by the fact of purchasing in-apps. This will help you to adjust the ads for such users or simply turn it off, if
needed. To make this setting work correctly, please submit the purchase info via the Appodeal SDK.
final purchase = AppodealAppStorePurchase.nonConsumable(
orderId: orderId,
price: price,
currency: currency,
transactionId: transactionId,
additionalParameters: {});
Appodeal.validateInAppPurchase(
purchase: purchase,
onInAppPurchaseValidateSuccess: (purchase, errors) {},
onInAppPurchaseValidateFail: (purchase, errors) {});
| Parameter |
Description |
Usage |
| orderId |
Product purchased unique order id for the transaction. |
Adjust/AppsFlyer |
| price |
In-app event revenue. |
Adjust/AppsFlyer/Appodeal |
| currency |
In-app event currency. |
Adjust/AppsFlyer/Appodeal |
| transactionId |
Product purchased transaction id. |
Adjust/AppsFlyer |
| additionalParameters |
Additional parameters of the in-app event. |
|
final purchase = AppodealPlayStorePurchase.inapp(
orderId: orderId,
price: price,
currency: currency,
additionalParameters: {})
..sku = sku
..publicKey = publicKey
..signature = signature
..purchaseData = purchaseData
..purchaseToken = purchaseToken
..purchaseTimestamp = purchaseTimestamp
..developerPayload = developerPayload
Appodeal.validateInAppPurchase(
purchase: purchase,
onInAppPurchaseValidateSuccess: (purchase, errors) {},
onInAppPurchaseValidateFail: (purchase, errors) {});
| Parameter |
Description |
Usage |
| purchaseType |
Purchase type. Must be InAppPurchase.Type.InApp or InAppPurchase.Type.Subs |
Adjust/AppsFlyer |
| publicKey |
Public key from Google Developer Console. |
AppsFlyer |
| signature |
Transaction signature (returned from Google API when the purchase is completed). |
Adjust/AppsFlyer |
| purchaseData |
Product purchased in JSON format (returned from Google API when the purchase is completed). |
AppsFlyer |
| purchaseToken |
Product purchased token (returned from Google API when the purchase is completed). |
Adjust |
| purchaseTimestamp |
Product purchased timestamp (returned from Google API when the purchase is completed). |
Adjust |
| developerPayload |
Product purchased developer payload (returned from Google API when the purchase is completed). |
Adjust |
| orderId |
Product purchased unique order id for the transaction (returned from Google API when the purchase is completed). |
Adjust |
| sku |
Stock keeping unit id. |
Adjust |
| price |
In-app event revenue. |
Adjust/AppsFlyer/Appodeal |
| currency |
In-app event currency. |
Adjust/AppsFlyer/Appodeal |
| additionalParameters |
Additional parameters of the in-app event. |
|
Event tracking
Appodeal SDK allows you to send events to all analytic services such as Firebase, AppsFlyer, Adjust
and Meta using a single method:
Appodeal.logEvent("example_event_name", {
"example_param_1": "example_param_value_1",
"example_param_2": 123
});
Use this method for send event for a specific service:
Appodeal.logEvent("example_event_name", {
"example_param_1": "example_param_value_1",
"example_param_2": 123
},
AppodealServices.APPSFLYER
);
You can use one or more of these values to select the service to send the event to:
AppodealServices.ADJUST - for Adjust service;
AppodealServices.APPSFLYER - for Appsflyer service;
AppodealServices.FACEBOOK - for Facebook service;
AppodealServices.FIREBASE - for Firebase service;
AppodealServices.ALL - for ALl services;
or you may combine these values, for example, to sent event to Appsflyer and Firebase services:
AppodealServices.APPSFLYER | AppodealServices.FIREBASE
Usage
Please, read iOS and Android docs at wiki to get deeper understanding how
Appodeal SDK works.
Initialisation
- Initialise Appodeal at application launch. To initialize Appodeal SDK use this following method:
Appodeal.initialize(
appKey: "YOUR_APPODEAL_APP_KEY",
adTypes: [
AppodealAdType.Interstitial,
AppodealAdType.RewardedVideo,
AppodealAdType.Banner,
AppodealAdType.MREC
],
onInitializationFinished: (errors) => {});
Note: Make sure to replace "YOUR_APPODEAL_APP_KEY" with the actual app key.
Use the type codes below to set the preferred ad format:
AppodealAdType.Interstitial for interstitial.
AppodealAdType.RewardedVideo for rewarded videos.
AppodealAdType.Banner for banners.
AppodealAdType.MREC for 300*250 banners.
- Configure SDK
Call this method before initialization
Appodeal.setAutoCache(AppodealAdType.Interstitial, false);
Appodeal.setTesting(false);
Appodeal.setLogLevel(Appodeal.LogLevelVerbose);
Appodeal.setChildDirectedTreatment(false);
Appodeal.disableNetwork("admob");
Appodeal.disableNetwork("admob", AppodealAdType.Interstitial);
Appodeal.setCustomFilter("levels_played", "levelsPlayed");
Appodeal.setExtraData("attribuition_id", "some value");
Appodeal.setTabletBanners(false);
Appodeal.setSmartBanners(false);
Appodeal.setBannerAnimation(true);
Appodeal.muteVideosIfCallsMuted(bool);
Appodeal.setAdViewAutoResume(true);
Appodeal.setAdRevenueCallbacks(onAdRevenueReceive: (adRevenue) => {});
Callbacks
Set callbacks listener to get track of ad lifecycle events.
- Banner
Appodeal.setBannerCallbacks(
onBannerLoaded: (isPrecache) => {},
onBannerFailedToLoad: () => {},
onBannerShown: () => {},
onBannerShowFailed: () => {},
onBannerClicked: () => {},
onBannerExpired: () => {});
- MREC
Appodeal.setMrecCallbacks(
onMrecLoaded: (isPrecache) => {},
onMrecFailedToLoad: () => {},
onMrecShown: () => {},
onMrecShowFailed: () => {},
onMrecClicked: () => {},
onMrecExpired: () => {});
- Interstitial
Appodeal.setInterstitialCallbacks(
onInterstitialLoaded: (isPrecache) => {},
onInterstitialFailedToLoad: () => {},
onInterstitialShown: () => {},
onInterstitialShowFailed: () => {},
onInterstitialClicked: () => {},
onInterstitialClosed: () => {},
onInterstitialExpired: () => {});
- Rewarded video
Appodeal.setRewardedVideoCallbacks(
onRewardedVideoLoaded: (isPrecache) => {},
onRewardedVideoFailedToLoad: () => {},
onRewardedVideoShown: () => {},
onRewardedVideoShowFailed: () => {},
onRewardedVideoFinished: (amount, reward) => {},
onRewardedVideoClosed: (isFinished) => {},
onRewardedVideoExpired: () => {},
onRewardedVideoClicked: () => {});
Presentation
Note: All presentation specific methods are available only after SDK initialisation
- Caching
If you disable autocache you should call cache method before trying to show any ad
Appodeal.cache(AppodealAdType.Interstitial);
- Check that ad is loaded and can be shown
var isCanShow = await Appodeal.canShow(AppodealAdType.Interstitial);
var isLoaded = await Appodeal.isLoaded(AppodealAdType.Interstitial);
- Show advertising
Appodeal.show(AppodealAdType.Interstitial);
Appodeal.show(AppodealAdType.BannerBottom);
Appodeal.show(AppodealAdType.BannerTop);
Appodeal.show(AppodealAdType.BannerLeft);
Appodeal.show(AppodealAdType.BannerRight);
Appodeal.show(AppodealAdType.Interstitial, “placementName”);
- Hide
You can hide banner/MREC ad after it was shown. Call hide method with another ad types won't affect anything
Appodeal.hide(AppodealAdType.BannerTop);
- Destroy
To free memory from hidden banner/MREC call the code below:
Appodeal.destroy(AppodealAdType.Banner);
Ad View
Display banner/MREC ad view at a custom position
Note: Ad View presentation support only fixed banners size - 320x50 and 300x250.
To display a Banner view add widget:
child: AppodealBanner(adSize: AppodealBannerSize.BANNER, placement: "default");
To display a MREC view add widget:
child: AppodealBanner(adSize: AppodealBannerSize.MEDIUM_RECTANGLE, placement: "default");
Privacy Policy and Consent
Note: Keep in mind that it’s best to contact qualified legal professionals, if you haven’t done so already, to get
more information and be well-prepared for compliance.
The General Data Protection Regulation, better known as GDPR, took effect on May 25, 2018. It’s a set of rules designed
to give EU citizens more control over their personal data. Any businesses established in the EU or with users based in
Europe are required to comply with GDPR or risk facing heavy fines. The California Consumer Privacy Act (CCPA) went into
effect on January 1, 2020. We have put together some resources below to help publishers understand better the steps
they need to take to be GDPR compliant.
Note: You can learn more about GDPR and CCPA and their differences.
differences here.
Step 1: Update Privacy Policy
1.1 Make sure your privacy policy includes information about advertising ID collection.
Don’t forget to add information about IP address and advertising ID collection, as well
as the link to Appodeal’s privacy policy to your app’s privacy policy in
Google Play and App Store.
To speed up the process, you could
use privacy policy generators —just insert advertising ID, IP
address, and location (if you collect a user’ location) in the "Personally Identifiable Information you collect" field (
in line with other information about your app)
and the link to Appodeal’s privacy policy in "Link to the privacy policy of
third party service providers used by the app".
1.2 Add a privacy policy to your mobile app.
You must add your explicit privacy policies in two places: your app’s Store Listing page and within your app.
You can find detailed instructions on adding your privacy policy to your app on legal service websites. For example,
Iubenda, the solution tailored to legal compliance, provides
a comprehensive guide on including a privacy policy in
your app.
Make sure that your privacy policy website has an SSL-certificate—this point might seem to be obvious, but it’s still
essential.
Here’s are two useful resources that you can utilize while working on your app compliance:
Privacy, Security and Deception regulations (by Google Play)
Recommendations on Developing a Meaningful Privacy Policy (by Attorney General California Department of Justice)
Note: Please note that although we’re always eager to back you up with valuable information, we’re not authorized to
provide any legal advice. It’s important to address your questions to lawyers who work specifically in this area.
Step 2: Appodeal Consent Solution
In order for Appodeal and our ad providers to deliver ads that are more relevant to your users, as a
mobile app publisher, you need to collect explicit user consent in the regions covered by GDPR and
CCPA.
To get consent for collecting personal data of your users, we suggest you use a ready-made
solution - Stack Consent Manager based on Google User Messaging Platform (UMP).
[!IMPORTANT]
STARTING FROM APPODEAL SDK 3.0, STACK CONSENT MANAGER IS INCLUDED BY DEFAULT.
Consent will be requested automatically on SDK initialization, and consent form will be shown if it is necessary without any additional calls.
If you wish, you can manage and update consent manually using Stack Consent Manager calls.
- Force Present Consent Form
Appodeal.ConsentForm.load(
appKey: exampleAppodealKey,
onConsentFormLoadSuccess: (status) {},
onConsentFormLoadFailure: (error) {},
);
Appodeal.ConsentForm.show(
onConsentFormDismissed: (error) {},
);
- Force Present Consent Form only when consent is required
Appodeal.ConsentForm.loadAndShowIfRequired(
appKey: exampleAppodealKey,
onConsentFormDismissed: (error) {},
);
Appodeal.ConsentForm.revoke();
- Privacy Entry Point (US State Regulations / GDPR re-consent)
US state privacy laws (CCPA, CPA, VCDPA, and others) follow an opt-out model: data processing
is allowed by default, but users must be given a permanent way to opt out — typically a
"Do Not Sell or Share My Personal Information" button (the Privacy Entry Point). In the US zone
no form is shown on initialization; the opt-out form must be presented on demand, in response to
a user tap.
Both APIs become available only after requestConsentInfoUpdate has completed (i.e. after a
load / loadAndShowIfRequired call).
Use getPrivacyOptionsRequirementStatus() to decide whether to render the opt-out button. It
returns PrivacyOptionsRequirementStatus.required for users in regulated US states and in the
EEA (for GDPR re-consent), .notRequired elsewhere, and .unknown before
requestConsentInfoUpdate has completed.
final status = await Appodeal.ConsentForm.getPrivacyOptionsRequirementStatus();
if (status == PrivacyOptionsRequirementStatus.required) {
}
Call showPrivacyOptionsForm() from the action handler of that button. This is the only way to
display the US opt-out form (or the GDPR re-consent form in the EEA), and it must be triggered by
an explicit user interaction — not at app launch.
Appodeal.ConsentForm.showPrivacyOptionsForm(
onConsentFormDismissed: (error) {
},
);
[!NOTE]
Once the user interacts with the US opt-out form, Stack Consent Manager writes the corresponding
IABGPP_* keys to the platform's default storage, where ad networks read them. Before the form
has been shown at least once, these keys remain empty and ad networks may treat the user as
"no consent collected".
- Non-personalized advertising (publisher-side consent control)
Starting from Appodeal SDK 4.3.0 the SDK ships an on-device consent-enforcement layer
(IAB TCF v2.3): it resolves consent from the CMP/TCF signals and from the publisher-set value,
then applies the result to the use of restricted data categories — advertising ID, location,
device fingerprint and demographics.
If you collect consent yourself, or you need to force non-personalized ads regardless of what
the CMP resolved, use setNonPersonalized. The publisher-set value takes precedence over the
CMP-resolved consent, so set it before Appodeal.initialize to have it applied from the first
ad request.
Appodeal.setNonPersonalized(true);
App-ads.txt
The app-ads.txt file is a text file which provides a mechanism for publishers to declare their authorized digital sellers.
You can find detailed information here.
App Tracking Transparency
Starting in iOS 14.5, IDFA will be unavailable until an app calls the App Tracking Transparency
framework to present the app-tracking authorization request to the end-user. If an app does not
present this request, the IDFA will automatically be zeroed out, which may lead to a significant
loss in ad revenue.
You can read more about App Tracking Transparency in our guide.
To display the App Tracking Transparency authorization request for accessing the IDFA, update your
Info.plist to add the NSUserTrackingUsageDescription key with a custom message describing the usage.
<key>NSUserTrackingUsageDescription</key>
<string>This identifier will be used to deliver personalized ads to you.</string>