Add Google Ad Manager ads to an iOS app
Serve Google Ad Manager ads in your IAB ad views. This is an optional module of the IAB Standard Size Experience SDK for iOS. Set up the SDK first by following Add IAB Standard Size Experiences to an iOS app, then add Google Ad Manager here.
Step 1: Add the module
- In your project, open the Genuin package (
https://github.com/genuininc/ios_sdk) and add theGenuinGMAAdsproduct to your app target. - Don't add Google's Mobile Ads package. It's already included in
GenuinGMAAds. This is separate from the Google IMA package that the SDK guide asks you to add.
Step 2: Configure Info.plist
Add two keys to your app's Info.plist:
GADApplicationIdentifier: your Google Ad Manager or AdMob app ID. This one is required. Without it Google ads are skipped silently.SKAdNetworkItems: Google's SKAdNetwork identifiers. Copy the current list from Google's documentation, and add them to the same array as the identifiers for any other ad network you use.
Info.plist
xml
<key>GADApplicationIdentifier</key>
<string>ca-app-pub-XXXXXXXXXXXXXXXX~YYYYYYYYYY</string>Step 3: Register the module
Pass BGGMAAds.module when you initialize the SDK in Step 6. Adding the product isn't enough: a module you don't pass isn't registered, and its ads are skipped silently.
MyApp.swift
swift
import GenuinSDK
import GenuinInStreamAds
import GenuinGMAAds
Genuin.shared.initialize(
modules: [BGInStreamAds.module, BGGMAAds.module],
apiKey: "<<YOUR_API_KEY>>"
)Where Google ads appear
- Banners:
BG320x50AdViewandBG300x250AdView. - Native ads: the other ad views.
The Ad Manager ad unit comes from your tag, so you don't pass it in code.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
| No Google ads appear and nothing is logged | GADApplicationIdentifier is missing from Info.plist, or the module isn't passed to initialize | Add the key (Step 2) and pass BGGMAAds.module (Step 3). |
| No Google ads appear for a valid setup | Google isn't enabled for your tag, or Ad Manager has no ad to serve | Ask your Genuin team to enable Google for your tag IDs and check the ad unit's inventory. |
| Google Mobile Ads is linked twice | You also added Google's Mobile Ads package | Remove it. GenuinGMAAds already includes it. |

