> ## Documentation Index
> Fetch the complete documentation index at: https://docs.contentignite.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Introduction

> Get started with your iOS (UIKit) integration

## 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 Ad Manager app ID found in the Ad Manager UI and of the form `ca-app-pub-################~##########`. If you do not have this ID, please contact the Content Ignite team.

2. Next add a `SKAdNetworkItems` key to your `Info.plist` with SKAdNetworkIdentifier values for Google (`cstr6suwn9.skadnetwork`) and [select third-party buyers](https://developers.google.com/ad-manager/mobile-ads-sdk/ios/3p-skadnetworks) who have provided these values to Google.

<Accordion title="Complete snippet">
  ```xml theme={null}
  <key>GADApplicationIdentifier</key>
  <!-- Sample Ad Manager app ID: ca-app-pub-3940256099942544~1458002511 -->
  <string>SAMPLE_APP_ID</string>
  <key>SKAdNetworkItems</key>
  <array>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>cstr6suwn9.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>4fzdc2evr5.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>2fnua5tdw4.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>ydx93a7ass.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>p78axxw29g.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>v72qych5uu.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>ludvb6z3bs.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>cp8zw746q7.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>3sh42y64q3.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>c6k4g5qg8m.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>s39g8k73mm.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>wg4vff78zm.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>3qy4746246.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>f38h382jlk.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>hs6bdukanm.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>mlmmfzh3r3.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>v4nxqhlyqp.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>wzmmz9fp6w.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>su67r6k2v3.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>yclnxrl5pm.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>t38b2kh725.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>7ug5zh24hu.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>gta9lk7p23.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>vutu7akeur.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>y5ghdn5j9k.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>v9wttpbfk9.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>n38lu8286q.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>47vhws6wlr.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>kbd757ywx3.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>9t245vhmpl.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>a2p9lx4jpn.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>22mmun2rn5.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>44jx6755aq.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>k674qkevps.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>4468km3ulz.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>2u9pt9hc89.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>8s468mfl3y.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>klf5c3l5u5.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>ppxm28t8ap.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>kbmxgpxpgc.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>uw77j35x4d.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>578prtvx9j.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>4dzt52r2t5.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>tl55sbb4fm.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>c3frkrj4fj.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>e5fvkxwrpn.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>8c4e2ghe7u.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>3rd42ekr43.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>97r2b46745.skadnetwork</string>
    </dict>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>3qcr597p9d.skadnetwork</string>
    </dict>
  </array>
  ```
</Accordion>

## 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](https://developer.apple.com/documentation/xcode/adding-package-dependencies-to-your-app#Add-a-package-dependency):

1. In Xcode, install the Content Ignite Mobile SDK UIKit Package using <b>File > Add Package Dependencies...</b>
2. When the prompt appears, search for the following URL for the UIKit version of the SDK:

```
https://gitlab.com/content-ignite/content-ignite-mobile-sdk-ios-uikit
```

3. 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](https://guides.cocoapods.org/using/using-cocoapods) for information on creating and using Podfiles.

To install the SDK into your project using [CocoaPods](https://guides.cocoapods.org/using/getting-started):

1. Open your project's Podfile and add this line to your app's target build configuration:

```
pod 'Content-Ignite-Mobile-UIKit'
```

2. In a terminal, run:

```bash theme={null}
pod install --repo-update
```

3. In your project's build settings:

* Add the `-ObjC` linker flag to <b>Other linker flags</b>.

## 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.

<Note>
  When creating an instance of `CIMobileAdsConfiguration` it is possible to enable optional features on the SDK, currently the only feature which can be enabled is debugging using the `setDebugFeature` API. This is discussed further in the [Debug Features](/app/ios_uikit/debugging) section.
</Note>

```swift theme={null}
let configuration = CIMobileAdsConfiguration.Builder(
    publisherId: "<PUBLISHER-ID>"
)
.setDebugFeature(enabled: true)
.setTestAds(enabled: true)
.build()
```

* `setTestAds(enabled: Boolean)` 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.

<Note>
  If you are currently using Google Mobile Ads SDK, it is no longer necessary to initialise this separately, and this code should be removed.
</Note>

An example is shown below:

```swift theme={null}
import CIMobileSDK

class AppDelegate: UIResponder, UIApplicationDelegate {
    
    func application(
        _ application: UIApplication, 
        didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil
        ) -> Bool {
        
        let configuration = CIMobileAdsConfiguration.Builder(
            publisherId: "<PUBLISHER-ID>"
        )
        .setDebugFeature(enabled: true)
        .setTestAds(enabled: true)
        .build()

        Task {
            let status = try await CIMobileAds.shared.initialise(
                configuration: configuration
            )
            switch status {
            case .succeeded:
                print("CIMobileSDK initialisation succeeded")
            case .failed:
                print("CIMobileSDK initialisation failed")
            }
        }
        
        return true
    }
}
```

### 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:

<Columns cols={2}>
  <Card title="App Open" icon="mobile-screen-button" href="/app/ios_uikit/ios_uikit_app_open">
    Ads that appear when a user opens or switches back to your app.
  </Card>

  <Card title="Banner" icon="rectangle-ad" href="/app/ios_uikit/ios_uikit_banner">
    Flexibly sized format for placing ads anywhere in your app.
  </Card>

  <Card title="Interstitial" icon="window-maximize" href="/app/ios_uikit/ios_uikit_interstitial">
    Full-screen ads that are designed to appear between content transitions.
  </Card>
</Columns>
