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



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

  1. Open your project in Xcode.

  2. From the menu bar, select File > Add Package Dependencies.

  3. In the package search field, enter the following repository URL:

    https://github.com/googleads/swift-package-manager-google-interactive-media-ads-ios

  4. Select the GoogleInteractiveMediaAds package.

  5. Select the package version and dependency rule. For new projects, Google recommends Up to Next Major Version.

  6. Add GoogleInteractiveMediaAds to your app target.

  7. Click Add Package to add the dependency to your project.



Manually add an ad client dependency

  1. Download and unzip the Google IMA SDK for iOS.
  2. From within Xcode, expand the project in the navigator.
  3. 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.
  4. Click Finish.
  5. Select the target in the project editor.
  6. Click General.
  7. 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.


Did this page help you?
© 2007- Longtail Ad Solutions, Inc.