Configure SDK
1. Enable test mode
Test mode allows you to show our test ads with 100% filtrate.
Appodeal.setTestingEnabled(true)
2. Enable logging
To enable debug logging, use the code below:
Appodeal.setLogLevel(.verbose)
APDLogLeveloff
- logs off;APDLogFlagError
- only error messages;APDLogLevelWarning
- warning and error messages;APDLogLevelDebug
- debug messages;APDLogLevelInfo
- error, warning and information messages;APDLogLevelVerbose
- all SDK and ad network messages.
Logs will be written to log using the Appodeal
tag.
3. Disable networks
Appodeal.disableNetworks([ARRAY_OF_NETWORKS])
adcolony
admob
amazon_ads
applovin
appnext
avocarrot
chartboost
facebook
flurry
inmobi
inner-active
ironsource
mailru
mmedia
mopub
mobvista
ogury
openx
pubnative
smaato
startapp
tapjoy
unity_ads
vungle
yandex
4. Disable networks for specific ad types
Appodeal.disableNetwork(for: .banner, name: "NETWORK_NAME") Appodeal.disableNetwork(for: .nativeAd, name: "NETWORK_NAME") Appodeal.disableNetwork(for: .MREC, name: "NETWORK_NAME") Appodeal.disableNetwork(for: .interstitial, name: "NETWORK_NAME") Appodeal.disableNetwork(for: .rewardedVideo, name: "NETWORK_NAME")
5. Set location tracking
Appodeal.setLocationTracking(true)
The SDK will check the location permission on the user's device. If this permission is missing, the user will get an alert message with the request for location tracking.
6. Test third-party networks adapters integration
To start test activity for testing adapters integration, call:
Appodeal.setTestingEnabled(true)
7. Disable data collection for kids apps
If your app is designed for kids you can disable sending user data to ad networks by the method below.
Should be called before the SDK initialization.
Appodeal.setChildDirectedTreatment(true)
8. Check if ad type was initialized
Appodeal.isInitialized(for: .banner)
true,
if the ad type was initialized.9. Check if autocache is enabled for ad type
Appodeal.isAutocacheEnabled(.banner)
true,
if autocache is enabled for this ad type.10. Send extra data
You can send key-value data to Appodeal. There is a pre-installed key kAPDAppsFlyerIdExtrasKey
Appodeal.setExtras([Any : Any])
11. Get predicted eCPM for ad type
Appodeal.predictedEcpm(for: .banner)
12. Update user consent
Appodeal.updateConsent(true)
Appodeal.updateConsentReport(newReport)