If you are not using FreeWheel Ad Manager, Google DAI, or Google IMA to serve your ads, skip to Schedule VAST ads.
The JW Player SDK for iOS integrates several ad client SDKs that you can use to request ads:
- FreeWheel Ad Manager
- 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.
CocoaPods can only be used for the following ad clients:
• Google DAI (included as part of the Google IMA SDK)
• Google IMA
- 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 plugin support table.
# Pods for MyAwesomeProject pod 'JWPlayer-SDK', 'SDK-VERSION-NUMBER' Pod 'GoogleAds-IMA-iOS-SDK', 'AD-CLIENT-DEPENDENCY-VERSION'
- Save Podfile and close the text editor.
- At the terminal prompt of your project directory, enter
pod installto install the JW Player SDK for iOS.
- Open the .xcworkspace file for your project to launch Xcode.
- Download and unzip the ad client SDK.
- From within Xcode, expand the project in the navigator.
- Drag framework file from those listed in the table below from your desktop into the Frameworks folder in Xcode. In the pop-up screen that appears, be sure to select your target.
|Ad client||Framework file|
|FreeWheel Ad Manager||AdManager.framework|
From your FreeWheel representative, request the FreeWheel Ad Manager SDK for iOS that is bitcode-enabled with dynamic libraries. This table shows the minimum supported FreeWheel SDK version that has been tested for each JW Player iOS SDK version.
In addition, refer to FreeWheel's documentation to ensure that you have added all the listed frameworks.
If you are using Swift instead of Objective-C, use the FreeWheel guide to set up your library.
|Google DAI / IMA||GoogleInteractiveMediaAds.framework|
- 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.
- (FreeWheel only) Highlight your target and in Build Settings > Linking > Other Linker Flags, add
-ObjC. This is required to compile the app against the FreeWheel iOS SDK.
Updated about 2 months ago
Now that you have added an ad client dependency, you can now schedule ads for any of the following ad clients: