Select platform: [Android](https://developers.google.com/admob/android/next-gen/quick-start "View this page for the Android platform documentation.") [iOS](https://developers.google.com/admob/ios/quick-start "View this page for the iOS platform documentation.") [Unity](https://developers.google.com/admob/unity/quick-start "View this page for the Unity platform documentation.") [Flutter](https://developers.google.com/admob/flutter/quick-start "View this page for the Flutter platform documentation.") [Android (Legacy)](https://developers.google.com/admob/android/quick-start "View this page for the Android (Legacy) platform documentation.")

<br />

[Video](https://www.youtube.com/watch?v=tH68C9KeRf8)

To deliver ads and earn revenue, integrate Google Mobile Ads SDK into
your iOS app. To prepare your project, you import and initialize
Google Mobile Ads SDK before you request ads.

If you include Firebase in your iOS app,
see
[Get started with AdMob in your iOS project](https://firebase.google.com/docs/admob/ios/quick-start).

This guide covers importing and initializing Google Mobile Ads SDK, and selecting
an ad format.

## Prerequisites

Before you continue, make sure you have the following:

- Use Xcode 16.0 or higher.
- Target iOS 13.0 or higher.

<!-- -->

- [Sign up for AdMob](https://support.google.com/admob/answer/2784575) and [set up an app in AdMob](https://support.google.com/admob/answer/2773509).

## Import Google Mobile Ads SDK

To import Google Mobile Ads SDK, complete one of the following sections:

### Swift Package Manager (Recommended)

To [add a package dependency](https://developer.apple.com/documentation/xcode/adding-package-dependencies-to-your-app#Add-a-package-dependency)
to your project, follow these steps:

1. Open Xcode.
2. Navigate to **File \> Add Package Dependencies...**.
3. Install the Google Mobile Ads SDK Swift Package.

4. In the prompt that appears, search for the Google Mobile Ads Swift Package
   GitHub repository:

       https://github.com/googleads/swift-package-manager-google-mobile-ads.git

5. Select the version of the Google Mobile Ads SDK Swift Package you want to use.
   For new projects, we recommend using **Up to Next Major Version**.

### CocoaPods

To use [CocoaPods](https://guides.cocoapods.org/using/getting-started), follow these
steps:

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

       pod 'Google-Mobile-Ads-SDK'

2. In a terminal, run the following command:

       pod install --repo-update

#### Configure deployment target for Xcode 27

Xcode 27 requires a minimum deployment target of iOS 15.0 for all targets.
Because Google Mobile Ads SDK supports iOS 13.0, Xcode 27 builds
fail when using CocoaPods.

To resolve this issue, follow these steps:

1. Open your project's `Podfile` and add a `post_install` hook that sets the
   deployment target to `15.0`. If you have a `post_install` block, add
   the inner loop to your existing block.

   The following example sets the `IPHONEOS_DEPLOYMENT_TARGET` key to `15.0` for
   all pod targets:

       post_install do |installer|
         installer.pods_project.targets.each do |target|
           target.build_configurations.each do |config|
             config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '15.0'
           end
         end
       end

2. To reinstall your pods, run the following command:

       pod install --repo-update

### Manual download

To manually download Google Mobile Ads SDK, do the following:

1. [Download](https://developers.google.com/admob/ios/download) Google Mobile Ads SDK.
2. Extract the `googlemobileadssdkios.zip` package.
3. In your Xcode project, add the following frameworks:

   - `GoogleMobileAds.xcframework`
   - `UserMessagingPlatform.xcframework`
4. In your target's **General** settings, navigate to
   **Frameworks, Libraries, and Embedded Content**.

5. Confirm that you've set the `GoogleMobileAds.xcframework` and
   `UserMessagingPlatform.xcframework` to **Embed \& Sign**.

6. In your project's build settings, do the following:

   - Add the `/usr/lib/swift` path to **Runpath Search Paths**.
   - Add the `-ObjC` linker flag to **Other Linker Flags**.

## Update your Info.plist file

In your app's `Info.plist` file, add the following keys:

- A `GADApplicationIdentifier` key with a string value of your AdMob app ID. For details, see
  [Find and copy an app ID or ad unit ID](https://support.google.com/admob/answer/7356431).

- A `SKAdNetworkItems` key. This key includes `SKAdNetworkIdentifier` values
  for Google `cstr6suwn9.skadnetwork` and
  [select third-party buyers](https://developers.google.com/admob/ios/3p-skadnetworks).

#### Complete example

```
<key>GADApplicationIdentifier</key>
<!-- Sample AdMob 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>
```

Replace <var class="readonly" translate="no">SAMPLE_APP_ID</var> with your AdMob app ID. While
testing, use the sample app ID shown in the previous example.

If you haven't [created an AdMob
account](https://support.google.com/admob/answer/2784575) and [registered an
app](https://support.google.com/admob/answer/2773509) yet, now's a great time
to do so.

## Initialize Google Mobile Ads SDK

Before loading ads, initialize Google Mobile Ads SDK by calling the `start()` method
from the [`GADMobileAds.sharedInstance`](https://developers.google.com/admob/ios/api/reference/Classes/GADMobileAds#sharedinstance)
property. This method calls a completion handler after Google Mobile Ads SDK and
mediation adapters finish processing, or after 30 seconds.

The following example initializes Google Mobile Ads SDK:

### Swift

    // Initialize the Google Mobile Ads SDK.
    MobileAds.shared.start()

### SwiftUI

    // Initialize the Google Mobile Ads SDK.
    MobileAds.shared.start()

### Objective-C

    // Initialize the Google Mobile Ads SDK.
    [GADMobileAds.sharedInstance startWithCompletionHandler:nil];

When initializing, Google Mobile Ads SDK might preload ads or initialize third party
SDKs when calling the `startWithCompletionHandler:` method. If you need to
obtain consent from users in the European Economic Area (EEA), the United
Kingdom (UK), or Switzerland, set request-specific flags. If you need to set
request-specific flags, make sure you set the flags before initializing
Google Mobile Ads SDK. For details, see [Targeting](https://developers.google.com/admob/ios/targeting).

## Select an ad format

After you import Google Mobile Ads SDK, you can select an ad format to implement.

AdMob offers the following ad formats:

| Ad format | Description | Documentation |
|---|---|---|
| Banner | Shows rectangular ads in a section of your app layout. This ad refreshes automatically at set intervals. Users see these ads periodically when staying on the same screen. | [Set up banner ads](https://developers.google.com/admob/ios/banner) |
| Interstitial | Shows full-page ads in your app. Place this ad at natural breaks and transitions in your app's interface, such as after a level completion in a gaming app. | [Interstitial ads](https://developers.google.com/admob/ios/interstitial) |
| Native | Lets you customize assets, such as headlines and calls to action, in your apps. When you customize the ad, you create ads that match your app's visual design. | [Load a native ad](https://developers.google.com/admob/ios/native) |
| Rewarded | Users earn in-app rewards, like coins or points, by playing games, taking surveys, or watching videos. You can set rewards for ad units, and specify the reward values and items your users receive. | [Rewarded ads](https://developers.google.com/admob/ios/rewarded) |
| Rewarded interstitial | Lets you offer rewards, such as coins or extra lives, for ads that appear during app transitions. | [Rewarded interstitial ads](https://developers.google.com/admob/ios/rewarded-interstitial) |
| App open | Appears when users open or go back to your app. The ad overlays the loading screen. | [App open ads](https://developers.google.com/admob/ios/app-open) |