2.5.13 iOS SDK Integration Guide

Get started

1. Get the app key

Add your app to Appodeal and get the app key for your application, as it is used during SDK integration.

2. Link your Admob account to Appodeal

Appodeal yields optimal results in cooperation with Admob. Use our application to link them. The application will allow Appodeal to access your Admob reports over API, and will create new ad units on Admob and submit them to Appodeal. Please, see this page for more information.

If you don't have Admob account, please sign up on  admob.com .


General Data Protection Regulation (GDPR) compliance

Publishers need to update their apps to collect the user consent prior to initializing our SDK (Read our guide on collecting consent  here ).

Publishers need to pass the boolean consent flag(with 'false' meaning that the user declined to give the consent) to the Appodeal.initialize() method of our SDK.

Appodeal.initialize(withApiKey: YOUR_APPODEAL_APP_KEY, types: adTypes, hasConsent: consent)

Integrate SDK

You can use our demo app as a reference project.

Mediation A/B testing

If you want to compare Appodeal's performance to another mediation, please follow this Mediation A/B testing guide .


1. Prepare your app

Set up the following keys in info.plist of your app:

In order to serve ads, the SDK requires you to allow arbitrary loads.

1. Go to your info.plist file, then press Add+ anywhere in the first column of the key list.

2. Add App Transport Security Settingskey and set its type to Dictionary in the second column.

3. Press Add+ at the end of the name App Transport Security Settingskey and choose Allow Arbitrary loads. Set its type to Boolean and its value to Yes.

You can also add the key to your info.plist directly, using this code:

<key>NSAppTransportSecurity</key>
<dict>
  <key>NSAllowsArbitraryLoads</key>
  <true/>
</dict>
4. Since Appodeal 2.5.13 that uses GoogleMobileAds 7.49.0 you need to add a valid GADApplicationIdentifier: Add GADApplicationIdentifier into info.plist with type string as key and your app identifier as value.
<key>GADApplicationIdentifier</key>
<string>ca-app-pub-3940256099942544~1458002511</string>

2. Choose your integration type

Version 2.5.13 contains major Parallel Bidding improvements and allows to get the best out of our Parallel Bidding solution. 

That version includes the Header Bidding feature. Read more about the Parallel bidding in our blog.

Minimum requirements:

  • iOS 9.0 or higher. You still can integrate the Appodeal SDK into a project with a lower value of minimum iOS version. On the devices that don’t support iOS 9.0+ our SDK will just be disabled.
  • The Appodeal SDK is compatible with both ARC and non-ARC projects.
  • Use XCode 9.0 or higher - without bitcode (with XCode 10+ bitcode is supported).

CocoaPods integration

1.  Podfile configuration

To download and integrate the Appodeal iOS SDK into your project using Cocoapods, add the following lines to your project's Podfile:

platform :ios, '9.0'   

target 'Name' do
pod 'Appodeal', '~> 2.5.13'
end

2. Call pod install

Call $ pod install to install CocoaPods dependencies or $ pod update to update. If you do not have an installed pod, Install CocoaPods to simplify dependency management

sudo gem install cocoapods
If you have problems with versions of pods, please run the following code:
rm -rf "${HOME}/Library/Caches/CocoaPods"
rm -rf "`pwd`/Pods/"
pod update
If the official repo doesn't respond, you can add aline to your podspec and update pods from the Appodeal mirror repository:
source 'https://github.com/appodeal/CocoaPods.git'
source 'https://github.com/CocoaPods/Specs.git'

3. Add Pods

You can add Pods with custom ad types:

  • Interstitial:

platform :ios, '9.0'   

target 'Name' do
pod 'Appodeal/Interstitial', '~> 2.5.13'
end

  • Banners and MRECs:

platform :ios, '9.0'   

target 'Name' do
pod 'Appodeal/Banner', '~> 2.5.13'
end

  • Rewarded video (or NonSkippable video):

platform :ios, '9.0'   

target 'Name' do
pod 'Appodeal/Video', '~> 2.5.13'
end

  •  Native ads:

platform :ios, '9.0'   

target 'Name' do
pod 'Appodeal/Native', '~> 2.5.13'
end

4. Known issues

AdColony presentation issue

AdColony always checks, if the key window’s rootViewController matches the passed rootViewController. Otherwise, Adcolony fails to present the ad. If your app has multiple independent windows, you can get a message with this or similar text:

AdColony [*** ERROR ***] : AdColony has ads, but could not display them. AdColony was unable to find the currently visible UIViewController for your app. Please ensure that your key UIWindow has a rootViewController.

It means, that the rootViewController that was used in showAd, doesn't belong to the first window in the array. 

GoogleMobileAds background playback issue

GoogleMobileAds will play music during ad downloading, if someone wants to change UserAgent on their custom UserAgent. The issue was detected in v. 7.33.1. This problem has not appeared in newer versions of the Google SDK (starting with v. 7.35.0), but then ads almost stop filling. 

GoogleMobileAds UIWebView crash iOS 13

Rendering of some of Google Mobile Ads creatives may be cause of crash. Workaround: You can force GoogleMobileAds to use WKWebView by adding following key value pair into your info.plist fail:

<key>gad_preferred_webview</key>
<string>wkwebview</string>

Flurry and Facebook symbols collisions

If your added both Flurry and FBAudienceNetwork adapters into project (included into fat Appodeal.framework by default) and try to compile under XCode 11. Your will see following warnings, that your can ignore:

ld: warning: duplicate symbol '_unztell64' in:
    ../Pods/Appodeal/APDFlurryAdapter.embeddedframework/FlurrySDK.framework/FlurrySDK(libExternalSDKs.a-x86_64-master.o)
    ../Pods/Appodeal/APDFacebookAudienceAdapter.embeddedframework/FBAudienceNetwork.framework/FBAudienceNetwork(unzip.c.o)...ld: warning: duplicate symbol '_fill_fopen64_filefunc' in:
../Pods/Appodeal/APDFlurryAdapter.embeddedframework/FlurrySDK.framework/FlurrySDK(libExternalSDKs.a-x86_64-master.o)
../Pods/Appodeal/APDFacebookAudienceAdapter.embeddedframework/FBAudienceNetwork.framework/FBAudienceNetwork(ioapi.c.o)

Bitcode XCode 10. 

If your want to upload your application with enabled bitcode, you need to use Xcode 11. Ad networks are distributed as binary frameworks. Some of them already compiled under XCode 11 with enabled bitcode

5. Initialize SDK

Import Appodeal/Appodeal.h in AppDelegate.m and initialize the SDK:

import Appodeal
Add the initialization key under the didFinishLaunchingWithOptions function:
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
        Appodeal.initialize(withApiKey: "YOUR_API_KEY", types: adTypes, hasConsent: consent)
        return true
    }
The adTypes parameter is responsible for ad formats (ex. AppodealAdTypeRewardedVideo, AppodealAdTypeInterstitial).

consent is boolean, with 'false' meaning that the user declines to give the consent. Read our guide on collecting consent here.

Publish your app

Before submitting your app to the App Store, you need to check the following settings.

1. Update Your IDFA Settings

When you submit your application to the App you need to update its "Advertising Identifier (IDFA)" settings in order to comply with Apple advertising policy.

1. Go to the Advertising Identifier section.

2. Set Yes on the right panel.

3. Tick Serve advertisements within the app.

4. Tick confirmation box under Limit Ad tracking setting in iOS.

2. Add usage descriptions to info.plist

If your app gets rejected by the App Store due to missing usage descriptions, add them to your info.plist file:

<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>

It’s done!

You are ready to use Appodeal and implement ad types. If you have any questions, check out our FAQ or contact the support team.

Third-party SDKs versions

All networks support bitcode.

Ad network nameVersion
AdColony4.1.1+
AmazonAds2.2.17.1+
AppLovin6.9.3+
Chartboost8.0.1+
FBAudienceNetwork5.5.1+
Flurry10.0.1+
Google Mobile Ads7.50.0+
InMobi9.0.0+
IronSource6.8.6.0+
Mintegral5.8.1
myTarget5.3.5+
Smaato21.1.2
StartApp4.0.0+
Tapjoy12.3.3+
UnityAds3.3.0+
Vungle6.4.5+
YandexMobileAds2.13.2+