MoPub SDK adapter

Last updated on October 23, 2018

If you want to use OpenX as a source of demand on MoPub via the MoPub SDK, you can build an adapter to integrate the OpenX Mobile iOS SDK with the MoPub 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., video interstitial, and opt-in video ads in the MoPub adapter sample app included in the OpenX Mobile iOS SDK. The sample adapters are built according to MoPub's instructions. You will need to customize the adapters to meet your needs as instructed below.

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.

  1. Add OpenXCoreSDK.framework to your project.
  2. Add the MoPub SDK to your project according to MoPub's instructions.
  3. Add the OpenX MoPub adapters to your project:
    • OXMMoPubBannerAdapter.h and OXMMoPubBannerAdapter.m

    • OXMMoPubInterstitialAdapter.h and OXMMoPubInterstitialAdapter.m

    • OXMMoPubVideoInterstitialAdapter.h and OXMMoPubVideoInterstitialAdapter.m

    • (Beta) OXMMoPubRewardedVideoAdapter.h and OXMMoPubRewardedVideoAdapter.m
  4. In the MoPub web interface, in an order, create a network line itemThe primary unit of execution for an order, which represents a specific inventory purchase and the required conditions for ad delivery. using the Custom Native Network type. In the Custom Class field, enter the class name of your custom event (for example, OXMMoPubBannerAdapter).
  5. In the Data field, use the following formats:
  6. Select the app and ad unitThe smallest inventory component that represents the space on a site where ads display. for the line item to target.
  7. If using multiple adapters (banner, interstitial, video interstitial, and/or opt-in video), create a separate line item for each adapter.
  8. Test your implementation and notify OpenX to enable live traffic.
Fill out my online form.