AdMob SDK adapter

Last updated on October 23, 2018

If you want to use OpenX as a source of demand on AdMob via the Google Mobile Ads SDK, you can build a custom event adapter to integrate the OpenX Mobile iOS SDK with the Google Mobile Ads SDK.

To help you quickly build your adapter, OpenX provides sample adapter code for bannerThis is an ad that appears on a web page which is typically hyperlinked to an advertiser’s website. Banners can be images (GIF, JPEG, PNG), JavaScript programs or multimedia objects (For example, Java)., interstitialA full-screen ad displayed in content transitions. For example, a video ad that loads between levels of a mobile game. display, and opt-in video ads in the AdMob adapter sample app. The sample adapters are built according to AdMob's instructions.

Note that opt-in videoA type of linear video ad or ad unit associated with mobile apps. A user opts into watching a full-screen, non-skippable video ad in exchange for a non-liquid, in-app reward after viewing the entire ad. Examples of rewards are: access to premium content or features, an extra life, continued play, a coupon, a discount code, or something else without monetary value. Opt-in video is also known as rewarded video and is not the same as incentivized video. in the OpenX Mobile SDK is in Beta release only; for more information, contact OpenX.

Note: You can also build your own custom event adapter to mediate OpenX video interstitial ads.

  1. Get the following from OpenX:
  2. In Xcode, add OpenXCoreSDK.framework to your project as described in Integrating the SDK with your app.
  3. Add the Google Mobile Ads SDK to your project according to AdMob's instructions.
  4. Add the OpenX AdMob adapters to your project:
    • (Beta) OXMAdMobCustomEventRewardedVideo.h and OXMAdMobCustomEventRewardedVideo.m
    • OXMAdMobCustomEventBanner.h and OXMAdMobCustomEventBanner.m
    • OXMAdMobCustomEventInterstitial.h and OXMAdMobCustomEventInterstitial.m
  5. In the AdMob UI, choose the mediation group to which you will add OpenX. For example, if you want to mediate OpenX rewarded video ads, choose an iOS rewarded video mediation group that you have created.
  6. In the AdMob UI, in the mediation group, define a custom event. Use the following settings:
  7. Save the custom event and the mediation group.

  8. Create a separate custom event for each ad format that you decide to use (banner, interstitial display, and rewarded video).
  9. Test your implementation and notify OpenX to enable live traffic.
Fill out my online form.