Skip to main content

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.
The SDK will not function properly without the adrop_service.json file.

2. Check Unit ID

Check the unit ID for your ad placement in the Ad Unit tab of the console.

Installation

  1. In Xcode, select File > Add Package Dependencies…
  2. Enter the package URL:
  1. Click Add Package
To use backfill ads, add an additional package:

CocoaPods

  1. Create Podfile if it doesn’t exist:
  1. Add to Podfile:
Podfile
  1. Install:
  1. Open the project with .xcworkspace file

Info.plist Configuration

Add the following settings to Info.plist for backfill ads:
  • GADApplicationIdentifier: App ID for backfill ads
  • SKAdNetworkItems: Required for ad conversion tracking on iOS 14+
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 in application(_:didFinishLaunchingWithOptions:) of your AppDelegate.

Initialization Parameters

Make sure to set production: true before deployment. If deployed with false, ads will not be displayed.

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 calling initialize().
auto mode automatically detects system dark mode settings. When the theme changes, the splash ad cache is automatically reset.

WebView Support

Register a WKWebView to display web ads within a WebView.
You can check the current SDK version using Adrop.sdkVersion.

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.

Native Ads

Interstitial/Rewarded 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