Skip to main content

Prerequisites

Requirements

  • Use Xcode 16.0 or higher.
  • Target iOS 17.2 or higher.

Updating your Info.plist

  1. Before installing, update the application Info.plist to add a GADApplicationIdentifier key with a string value of your Google Ad Manager app ID, of the form ca-app-pub-################~##########.
Which app ID to use depends on your Content Ignite setup. Plug-and-play customers (using Content Ignite’s Google Ad Manager account) use the app ID provided by Content Ignite. SaaS customers use their own Google Ad Manager account’s app ID. If you are migrating from the Google Mobile Ads SDK, do not assume your existing app ID is the correct one — contact the Content Ignite team to confirm which app ID to use.
  1. Next add a SKAdNetworkItems key to your Info.plist with SKAdNetworkIdentifier values for Google (cstr6suwn9.skadnetwork) and select third-party buyers who have provided these values to Google.

Installation

Use of the following methods to install the Content Ignite Mobile SDK.

Swift Package Manager

To install the SDK into your project using Swift Package Manager:
  1. In Xcode, install the Content Ignite Mobile SDK UIKit Package using File > Add Package Dependencies…
  2. When the prompt appears, search for the following URL for the UIKit version of the SDK:
  1. Select the version of the Content Ignite Mobile SDK UIKit Package you want to use. For new projects, we recommend using the Up to Next Major Version.

CocoaPods

Before you continue, review Using CocoaPods for information on creating and using Podfiles. To install the SDK into your project using CocoaPods:
  1. Open your project’s Podfile and add this line to your app’s target build configuration:
  1. In a terminal, run:
  1. In your project’s build settings:
  • Add the -ObjC linker flag to Other linker flags.

Initialising the SDK

First we will create an instance of CIMobileAdsConfiguration. This is achieved using CIMobileAdsConfiguration.Builder. The builder takes one required parameter:
  • publisherId: String: A unique identifier to identify the publisher in the Fusion platform.
Then call the build API to create the instance.
When creating an instance of CIMobileAdsConfiguration it is possible to enable optional features on the SDK including debugging and test ads.
  • setTestAds(enabled: Bool) was added to CIMobileAdsConfiguration.Builder in 1.7.0 to control whether test ads are enabled, this was previously only possible from the debug menu. If this is set the Debug Menu option will be hidden and if not set the Debug Menu option will be used.
Next we pass this configuration into the singleton instance CIMobileAds initialise API. This is an async-await function. It takes one required parameter:
  • configuration: An instance of CIMobileAdsConfiguration.
The call to initialise the SDK should be made as early as possible in the application lifecycle.
If you are currently using Google Mobile Ads SDK, it is no longer necessary to initialise this separately, and this code should be removed.
An example is shown below:

Select an ad format

Content Ignite Mobile SDK is now imported and you’re ready to implement an ad. We offer a number of different formats:

App Open

Ads that appear when a user opens or switches back to your app.

Banner

Flexibly sized format for placing ads anywhere in your app.

Interstitial

Full-screen ads that are designed to appear between content transitions.