Get Started
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.
The following document shows how to integrate Appodeal in your iOS project with your desired networks via CocoaPods, Swift Package Manager and manual setup, and configure all your ad formats.
- iOS 15.0 and above
- Xcode 26.0 or higher with Swift Package Manager; Xcode 16.4 is enough with CocoaPods
You can use our demo app as a reference project.
Demo App
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".
The recommended Podfile below does not include the service adapters: you add them in
Step 2. The SDK package for the manual setup includes them; if you do not need
some of them, exclude them from the SDK package.
We recommend using the standard configuration, as disabling some of the recommended adapters can negatively affect revenue.
- Cocoa Pods
- Swift Package Manager
- Manual
- Podfile configuration
Here is a base and recommended Podfile setup. You can add or remove any ad network or service adapter depending on your requirements.
We provide a convenient and interactive way to customize and generate Podfile code based on selected ad types, networks and services.
To configure your Podfile please visit Configure Mediated Networks page.
Generating code...
- 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 pods versions, 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 lines to your podspec and update pods from the Appodeal mirror repository:
source 'https://github.com/appodeal/CocoaPods.git'
source 'https://cdn.cocoapods.org/'
If you are receiving error like this
[!] CDN: trunk URL couldn't be downloaded: https://cdn.cocoapods.org/Specs/0/3/e/Appodeal/${VERSION}/Appodeal.podspec.json Response: Failure when receiving data from the peer
please run the following command
pod repo remove trunk
- Open your project using .xcworkspace file from now on.
To integrate the Appodeal SDK through SPM:
-
In Xcode, click File → Add Package Dependencies…
-
In the search bar, enter the Appodeal Swift Package GitHub repository URL, then select the package when it appears.
https://github.com/appodeal/Appodeal-Swift-Package -
Choose a Dependency Rule and set Add to Project to your app target.
-
Click Add Package to integrate the
AppodealSDK. -
Repeat steps 1–4 for every ad network and service adapter you need. The full list of package URLs is on the Configure Mediated Networks page.
With Swift Package Manager you must add the -ObjC flag to Other Linker Flags in your
project's Build Settings:
- Select your project in the Project Navigator
- Select your target
- Go to the Build Settings tab
- Search for "Other Linker Flags"
- Add
-ObjCto the list of flags
The SDK will not function correctly without this flag.
- Download SDK
Integrate iOS SDK 4.4.0
SDK 4.4.0
- Copy files to your project
Open your project in Xcode, then drag the downloaded frameworks into your project. (use the "Product Navigator view").
Choose "Copy items into destination group's folder" and click "Finish".
- Add Linker flag
Now you need to add the -ObjC linker flag. In your XCode project click
Project -> Build Settings -> Search for "Other Linker Flags" -> Add -ObjC.
Add libraries to Build Phases -> Link Binary with Libraries to ensure compatibility with Objective-C categories and low-level system functions:
libc++.tbdlibresolv.tbdlibz.tbdlibc++abi.tbdlibbz2.tbd
- Set Embed and Sign for Frameworks
In your Xcode project, go to Project -> General -> Frameworks, Libraries, and Embedded Content section. Ensure the following frameworks are set to Embed & Sign:
ATOM.xcframeworkAdjustSigSdk.xcframeworkAppLovinSDK.xcframeworkDTBiOSSDK.xcframeworkFBAEMKit.xcframeworkFBSDKCoreKit.xcframeworkFBSDKCoreKit_Basics.xcframeworkInMobiSDK.xcframeworkMobileFuseSDK.xcframeworkMolocoSDK.xcframeworkOMSDK_Ogury.xcframeworkOMSDK_Pubmatic.xcframeworkOMSDK_Pubnativenet.xcframeworkOMSDK_Smaato.xcframeworkOguryAds.xcframeworkOguryCore.xcframeworkOgurySdk.xcframeworkOpenWrapSDK.xcframeworkSmaatoSDKBanner.xcframeworkSmaatoSDKCore.xcframeworkSmaatoSDKInAppBidding.xcframeworkSmaatoSDKInterstitial.xcframeworkSmaatoSDKNative.xcframeworkSmaatoSDKOpenMeasurement.xcframeworkSmaatoSDKOutstream.xcframeworkSmaatoSDKRewardedAds.xcframeworkSmaatoSDKRichMedia.xcframeworkSmaatoSDKVideo.xcframeworkStartApp.xcframeworkTaurusxAdsSDK.xcframework
Step 2. Connect Services
If you plan to run UA (User Acquisition) campaigns, want to analyze your metrics in Appodeal's business intelligence tool without using an MMP, or want to use remote config for tests and settings, connect the services below. Each service also needs its own setup, described on its page:
-
Connect Adjust or AppsFlyer to unlock Attribution features for your UA campaigns.
-
Connect Meta (formerly known as facebook-core) for User Acquisition.
-
Connect Firebase for Analytics + remote config for product A/B tests and settings.
- Cocoa Pods
- Swift Package Manager
- Manual
The Podfile from Step 1 does not include the services. The code below adds the adapters of all these services:
add it to your Podfile and call $ pod install again. If you do not need some of the services, simply remove
their lines, or customise the set on the Configure Mediated Networks page.
Generating code...
Add the packages of the services you need the same way as the Appodeal SDK in Step 1. Their package URLs are on the Configure Mediated Networks page.
Step 3. Prepare Your Application
Add SKAdNetworkIds
To ensure SKAdNetwork packages can be correctly scanned, follow the Semantic Versioning (SemVer) format for your app version.
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 SwiftUI 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
<key>SKAdNetworkItems</key>
<array>
</array>
Add AdAttributionKit IDs
AdAttributionKit is Apple's modern framework for ad attribution that works alongside SKAdNetwork.
Ad networks used in Appodeal mediation support AdAttributionKit for improved conversion tracking and attribution on iOS 17.4+.
To enable this functionality, you will need to add the AdAttributionKitItems key with an additional
dictionary in your Info.plist, similar to SKAdNetworkItems.
- Select Info.plist in the Project navigator in Xcode
- Right-click on Info.plist file → Open as → Source Code
- Copy the AdAttributionKitItems from below and paste it into your Info.plist file
There is AdAttributionKit IDs in Info.plist format
<key>AdAttributionKitItems</key>
<array>
</array>
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
GADApplicationIdentifierwith 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 4. 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) and initialize the SDK:
- Swift
- Objective-C
import Appodeal
#import <Appodeal/Appodeal.h>
We recommended to call initialization method
in AppDelegate -didFinishLaunchingWithOptions: function:
- Swift
- Objective-C
@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)
// 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
}
}
@interface MyAppDelegate () <AppodealInitializationDelegate>
@end
@implementation MyAppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[Appodeal setAutocache:NO types:AppodealAdTypeInterstitial]; [Appodeal setLogLevel:APDLogLevelVerbose];
// Optional delegate for initialization completion
[Appodeal setInitializationDelegate:self];
/// Any other pre-initialization
/// app specific logic
[Appodeal initializeWithApiKey:@"APP KEY" types:AppodealAdTypeInterstitial];
return YES;
}
- (void)appodealSDKDidInitialize {
// Appodeal SDK did complete initialization
}
@end
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.
Make sure to replace YOUR_APP_KEY with the actual app key.
You can find it in the list of applications in your personal account.
Step 5. 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.
Step 6. What's next
Configure App Privacy
Configure App Privacy according to this doc:
App Privacy Details
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.
You can find detailed information here