Get Started
Release version: 3.0.2 | Release date: 17.01.2023
Beta release version: 3.1.3-beta.1 | Release date: 26.05.2023
Follow this guide to get the best out of Appodeal.
The Appodeal SDK gives you access to 70+ Ad Demand Sources and makes them compete against each other in a real-time auction, maximizing your ad revenues. The Appodeal SDK also provides In-app Bidding, Automatic UA Optimization, User Segmentation & A/B Testing, Cross-Promotion and Direct Deals, Instant Payouts, and much more.
Appodeal SDK provides two ways of integration. From the options below, choose the one that fits your needs better:
- The Appodeal SDK Full Package - The Appodeal SDK provides you with tools to grow your mobile apps and games.
In addition to the monetization services, you can benefit from UA (User Acquisition) and in-app analytics services.
Here is the list of services Appodeal SDK Full Package includes :Get started with Appodeal to gain access to Monetization and Analytics.
Connect with Adjust or Appsflyer to unlock Attribution features.
Connect with Meta (formerly known as facebook-core) for User Acquisition.
Connect with Firebase for Analytics + remote config for product A/B tests and settings.
- The Appodeal SDK Mediation only - If you do not plan to run (UA) User Acquisition campaigns, nor want to use Appodeal advanced analytics, we have created a lite version of our SDK, only with mediation.
During the integration, you will not be required to install any additional services apart from mediation.
This may speed up your integration process, and you can always upgrade to the Full Package whenever you’re ready.
Please follow this integration guide step by step and choose your integration option when needed.
The following document shows how to integrate Appodeal in your iOS project with your desired networks via CocoaPods and manual setup, and configure all your ad formats.
Minimum requirements:
- iOS 12.0 or higher. You still can integrate Appodeal SDK into a project with a lower value of minimum iOS version. However, on devices that don’t support iOS 12.0+ our SDK will just be disabled.
- Appodeal SDK is compatible with both ARC and non-ARC projects.
- Use Xcode 14.0 or higher.
You can use our demo app as a reference project.
Step 1. Import SDK
Fat and CocoaPods SDK versions work in pure Obj-C, and Swift as well as mixed Obj-C or Swift projects.
If your project is a pure Objective-C project, you should add an empty Swift file, for example, Dummy.swift.
Xcode will offer you to create Bridging Header after adding the empty Swift file, press "Create".
Please select the ad types that are used in your application and the ad networks that you want to include.
Disabling ad networks
As you have selected Appodeal SDK Full Package option, make sure you have not excluded services from the Podfile or from the SDK package.
We recommend using the standard configuration, as disabling some of the recommended adapters can negatively affect revenue.
1. Podfile configuration
CocoaPods 1.10.0 or higher is required. To get information about CocoaPods update, please see this documentation.
Select the ad types that are used in your application and the ad networks that you want to include, and select services if you use Appodeal SDK Full Package.
Then press Generate Podfile
button and copy the resulting configuration into your project's Podfile.
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
rm -rf "${HOME}/Library/Caches/CocoaPods" rm -rf "`pwd`/Pods/" pod update
source 'https://github.com/appodeal/CocoaPods.git' source 'https://cdn.cocoapods.org/'
3. Open your project using .xcworkspace file from now on.
If you have an Apple silicon processor, you need to open Xcode using Rosetta to avoid the "Framework not found BidMachinePangleAdapter" error.
You can learn more here about this error and how to open Xcode using Rosetta.
Step 2. Prepare Your Application
Add 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
.
If you are using Xcode 14+ and Swift UI in your app, then you can notice that there is no Info.plist in project navigator by default.
You need to go to Target → Info tab → Custom iOS Target Properties and make any changes to it by simply adding an empty line so the Info.plist file shows up in your project navigator.
- Select Info.plist in the Project navigator in Xcode
- Right-click on Info.plist file → Open as → Source Code
- Copy the SKAdNetworkItems from below and paste it into your Info.plist file
There is SKAdNetworks IDs in Info.plist
format:
Configure App Transport Security Settings
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 .
You can also add the key to your info.plist directly, using this code:
<key>NSAppTransportSecurity</key> <dict> <key>NSAllowsArbitraryLoads</key> <true/> </dict>
Location Description (Optional)
NSLocationWhenInUseUsageDescription - Entry is required if your application allows Appodeal SDK to use location data.
<key>NSLocationWhenInUseUsageDescription</key> <string><App Name> needs your location for analytics and advertising purposes</string>
To use location services, your app requests authorization, and the system prompts the user to grant or deny the request.
Please implement Core Location and ask users permission according to the official documentation.
Other Feature Usage Descriptions
To improve ad performance the following entries should be added:
- GADApplicationIdentifier - When including AdMob in your project, you must also add your AdMob app ID to your info.plist . Use the key
GADApplicationIdentifier
with the value being your AdMob app ID.
For more information about Admob sync check out our Admob guide. - NSUserTrackingUsageDescription - Starting from iOS 14, using IDFA requires permission from the user. The following entry must be added in order to improve ad performance.
- NSCalendarsUsageDescription - Recommended by some ad networks.
<key>GADApplicationIdentifier</key> <string>YOUR_ADMOB_APP_ID</string> <key>NSUserTrackingUsageDescription</key> <string><App Name> needs your advertising identifier to provide personalised advertising experience tailored to you</string> <key>NSCalendarsUsageDescription</key> <string><App Name> needs your calendar to provide personalised advertising experience tailored to you</string>
Please note, if you have removed the Admob adapter, don't forget to remove the BDMNotsyAdapter as well using this guide.
Step 3. Initialize SDK
Before initialisation, we highly recommend to receive all required permissions from the user. Please follow this Data Protection guide.
Import Appodeal into AppDelegate (AppDelegate.m) class and initialise the SDK:
import Appodeal
didFinishLaunchingWithOptions
function:
@UIApplicationMain final class MyAppDelegate: UIResponder, UIApplicationDelegate, AppodealInitializationDelegate { func application( _ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil ) -> Bool { Appodeal.setAutocache(false, types: .interstitial) Appodeal.setLogLevel(.verbose) // New optional delegate for initialization completion Appodeal.setInitializationDelegate(self) /// Any other pre-initialization /// app specific logic Appodeal.initialize( withApiKey: "APP_KEY", types: .interstitial ) return true } func appodealSDKDidInitialize() { // Appodeal SDK did complete initialization } }
adTypes
is a parameter responsible for ad formats (ex. AppodealAdTypeRewardedVideo, AppodealAdTypeInterstitial
). Initialize only those ad types you want to use in your app to avoid getting ad requests to unused ones.consent
is an object responsible for agreement to having user's personal data collected according to GDPR and CCPA laws. You can find more information here.YOUR_APP_KEY
with the actual app key. You can find it in the list of applications in your personal account.Step 4. Configure Ad Types
Appodeal SDK is now imported and you're ready to implement an ad. Appodeal offers a number of different ad formats, so you can choose the one that best fits your app's user experience.
Full-screen ad that engages users with a captivating video.
User-initiated ads where users can earn in-app rewards in exchange for viewing a video ad.
Traditional ad format that neatly places a small ad at the top or bottom of the screen.
Medium-size ads that appear within in-app content the same as banner ads.
Ad format that seamlessly fits within the context of an app’s content.
Step 5. Publish Your Application
Configure App Privacy according to this doc:
Step 6. Add App-ads.txt File
The app-ads.txt file is a text file which provides a mechanism for publishers to declare their authorized digital sellers. Created by IAB, it is an extension of the original ads.txt standard that was used for the same purpose in web advertising. It helps ad networks and DSPs easily verify whether an ad network or exchange they are buying your traffic from is allowed to sell it.
Adding app-ads.txt augments trust between advertisers, demand partners and publishers. If publishers do not have their own website where they can place an add app-ads.txt file, premium brand demand may be unavailable to them.
If you don't have app-ads.txt file yet:
Add developer website URL to your Google Play and App Store apps.
Download Appodeal's app-ads.txt from this page.
Upload app-ads.txt file to the root path of your developer website (it should look like this: example.com/app-ads.txt).
If you already have app-ads.txt:
Copy Appodeal's app-ads.txt from this page.
Paste the content to your app-ads.txt.