Add an ad client dependency (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 JWP SDK for iOS integrates several ad client SDKs that you can use to request ads:

  • Google DAI
  • Google IMA

To begin using any of the supported ad clients, you must first add the dependency to your app. After you have the items listed in the Requirements section, you can use CocoaPods or a manual (Local) approach to add one or multiple ad client dependencies.



Requirements



Use CocoaPods to add an ad client dependency

Edit Podfile

  1. In a text editor, open the Podfile for your app.
  2. Add GoogleAds-IMA-iOS-SDK as a dependency. Be sure to use the version located in the googleIMAVersion property. You can also review this dependency (iOS).
    # Pods for MyAwesomeProject
    pod 'JWPlayer-SDK', '>=4.0.0'
    Pod 'GoogleAds-IMA-iOS-SDK', '~>3.14.1'
    
  3. Save Podfile and close the text editor.

Install the SDK

  1. At the terminal prompt of your project directory, enter pod install to install the JWP SDK for iOS.
  2. Open the .xcworkspace file for your project to launch Xcode.


Manually add an ad client dependency

  1. Download and unzip the ad client SDK.
  2. From within Xcode, expand the project in the navigator.
  3. Drag GoogleInteractiveMediaAds.framework from your desktop 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.


© 2007-2024 Longtail Ad Solutions, Inc.