Overview
Use the Adrop iOS SDK to display various ad formats in your app.Supported Ad Formats
Requirements
- iOS 13.0 or higher
- Xcode 14.1 or higher
- Swift 5.0 or higher
Prerequisites
1. Add adrop_service.json File
1
Download File
Download the
adrop_service.json file from Ad Control Console > Admin > App.2
Add to Project
Add the downloaded file to your Xcode project root.
3
Check Targets
When adding the file, ensure that all targets are selected.
2. Check Unit ID
Check the unit ID for your ad placement in the Ad Unit tab of the console.Installation
Swift Package Manager (Recommended)
- In Xcode, select File > Add Package Dependencies…
- Enter the package URL:
- Click Add Package
CocoaPods
- Create Podfile if it doesn’t exist:
- Add two
sourcelines at the top of the Podfile, then add the pods to your app target:
Podfile
- From 1.18.0,
adrop-adsandadrop-ads-backfillare published to the adrop-specs spec repo instead of CocoaPods trunk. Adding the lines while you’re on an earlier version is harmless. Commit the updatedPodfile.lockafter adding them. - Add both lines. Once a Podfile lists any
source, CocoaPods stops adding trunk on its own, so other pods such as Google Mobile Ads SDK can’t be installed. - If your Podfile already has
source 'https://github.com/CocoaPods/Specs.git', add only the first line.
- Install:
- Open the project with
.xcworkspacefile
When you upgrade from 1.17.x or earlier to 1.18.0 or later, add the two
source lines and run pod update adrop-ads adrop-ads-backfill (or pod update adrop-ads if you don’t use backfill ads). pod install alone keeps the earlier versions recorded in Podfile.lock. Commit the updated Podfile.lock too, or pod install --deployment in CI fails.Backfill SDK Requirements
Backfill SDK (adrop-ads-backfill) 1.18.0 and later uses Google Mobile Ads SDK 13 (13.0 or later, below 14). You don’t need to change your app code.
- An app can’t use Google Mobile Ads SDK 12 and 13 together. If another library in your app uses Google Mobile Ads SDK 12, installation fails with CocoaPods, and with SPM only the backfill SDK may be installed at 1.17.x without an error. CocoaPods ends the error with
required a higher minimum deployment target, but the cause is the version conflict, not your deployment target. Update that library to a version that supports Google Mobile Ads SDK 13, or keep the Adrop SDK on 1.17.x (for CocoaPods,pod 'adrop-ads-backfill', '~> 1.17.0'; for SPM, set bothadrop-ads-podandadrop-ads-backfill-podto Up to Next Minor Version from 1.17.0). - Google Mobile Ads SDK 13.4 and later requires Xcode 26.2 or later.
If your app is directed to children and sets
ageRestrictedTreatment in Google Mobile Ads SDK, also set tagForChildDirectedTreatment. Only then does the child-directed signal reach the backfill mediation networks (Pangle, InMobi, Liftoff Monetize, AppLovin, ironSource). The teen signal isn’t passed to these networks.Info.plist Configuration
Add the following settings toInfo.plist for backfill ads:
- GADApplicationIdentifier: App ID for backfill ads
- SKAdNetworkItems: Required for ad conversion tracking on iOS 14+
View Info.plist Configuration
View Info.plist Configuration
Info.plist
If your Info.plist already contains a
SKAdNetworkItems key, do not add a new one — merge only the array (<array>) entries. Duplicate keys cause iOS to use only the first array.Please contact Adrop for the full SKAdNetworkItems list and App ID.
Initialization
Initialize the SDK inapplication(_:didFinishLaunchingWithOptions:) of your AppDelegate.
Initialization Parameters
User Configuration
Set UID
Set a user identifier for targeted advertising.Set the UID before entering the ad placement for targeted ads to work properly.
Set Theme
Set the theme for ads that support dark mode. Must be set after callinginitialize().
auto mode automatically detects system dark mode settings. When the theme changes, the splash ad cache is automatically reset.WebView Support
Register aWKWebView to display web ads within a WebView.
You can check the current SDK version using
Adrop.sdkVersion.Deep Link Handling
Handle deep links when the app is launched via external links.Test Unit IDs
Use test unit IDs during development. Replace with actual unit IDs before production deployment.Banner Ads
Native Ads
Interstitial/Rewarded Ads
Popup Ads
Splash Ads
Error Codes
Main error codes returned when ad loading fails.
See Reference for detailed error codes.
Table of Contents
Banner Ads
Implementing banner ads
Native Ads
Implementing native ads
Interstitial Ads
Implementing interstitial ads
Rewarded Ads
Implementing rewarded ads
Popup Ads
Implementing popup ads
Splash Ads
Implementing splash ads
WebView Guide
Display web ads in WebView
UMP Integration
GDPR/CCPA consent management
Targeting Settings
User attributes and contextual targeting
Reference
Classes, delegates, error codes
Examples
Example repository