Google IMA and DAI (iOS)
Enable Google IMA and Google DAI ad requests in your iOS app
If you are not using Google DAI or Google IMA to serve your ads, skip to Schedule VAST ads.
The JWX SDK for iOS integrates several ad client SDKs that you can use to request ads:
- Google DAI
- Google IMA
To use a supported ad client, you must add its dependency to your app. After meeting the prerequisites below, you can add the dependency using Swift Package Manager (SPM) or manual installation.
Prerequisites
| Ad Client | Requirements |
|---|---|
| Google DAI | All the JWX iOS SDK requirements Google's Ad Manager 360 Advanced |
| Google IMA | All the JWX iOS SDK requirements |
Use Swift Package Manager to add an ad client dependency
Follow these steps to add the Google IMA or Google DAI ad client to your app using Swift Package Manager (SPM):
-
Open your project in Xcode.
-
From the menu bar, select File > Add Package Dependencies.
-
In the package search field, enter the following repository URL:
https://github.com/googleads/swift-package-manager-google-interactive-media-ads-ios -
Select the GoogleInteractiveMediaAds package.
-
Select the package version and dependency rule. For new projects, Google recommends Up to Next Major Version.
-
Add GoogleInteractiveMediaAds to your app target.
-
Click Add Package to add the dependency to your project.
Manually add an ad client dependency
- Download and unzip the Google IMA SDK for iOS.
- From within Xcode, expand the project in the navigator.
- Drag GoogleInteractiveMediaAds.framework from the extracted SDK folder into the Frameworks folder in Xcode. In the popup screen that appears, be sure to select your target.
- Click Finish.
- Select the target in the project editor.
- Click General.
- Verify that the added frameworks appear in the Frameworks, Libraries and Embedded Content section. The Embed toggle should be set to Do not embed. If any framework is missing from the list, add it by clicking the + button at the bottom of the section.
Updated 9 days ago
