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.
|Google DAI||All the JWP iOS SDK requirements|
Google's Ad Manager 360 Advanced
|Google IMA||All the JWP iOS SDK requirements|
Use CocoaPods to add an ad client dependency
- In a text editor, open the Podfile for your app.
GoogleAds-IMA-iOS-SDKas a dependency. Be sure to use the version located in the
googleIMAVersionproperty. You can also review this dependency (iOS).
# Pods for MyAwesomeProject pod 'JWPlayer-SDK', '>=4.0.0' Pod 'GoogleAds-IMA-iOS-SDK', '~>3.14.1'
- Save Podfile and close the text editor.
Install the SDK
- At the terminal prompt of your project directory, enter
pod installto install the JWP SDK for iOS.
- Open the .xcworkspace file for your project to launch Xcode.
Manually add an ad client dependency
- Download and unzip the ad client SDK.
- From within Xcode, expand the project in the navigator.
- Drag GoogleInteractiveMediaAds.framework from your desktop 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 2 months ago