iOS SDK AdMob Adapter

19 views 28/12/2017 Shay Karpeles 0

Getting Started

This document details the process of integrating YouAppi’s SDK AdMob adapter with your iOS app.

If you have any question you can email us to: sdk@youappi.com

The basic steps of integration are:

  • Integrate YouAppi SDK using YouAppi SDK integration document.
  • Add YouAppi AdMob mediation files to your project.
  • Follow the instructions below.

Download YouAppi’s iOS SDK AdMob Adapter

iOS SDK AdMob adapter can be found in YouAppi’s iOS SDK package.

Setup

  • Install YouAppi iOS SDK as described in the document.
  • In the SDK zip file extract the files in the package: youappi-sdk-ios-admob.zip.
  • Drag the extracted files and drop them on your XCode project.
  • Make sure to select “Copy items if needed”:

Create a new iOS app

  • On ad mob platform go to apps section.
  • Press ADD APP button.

  • Follow through the steps of creating a new app.

Add to your iOS app ad units

Add new ad units to your app by choosing your app and pressing ADD AD UNIT button

Rewarded Video

  • After pressing ADD AD UNIT button select Rewarded:

  • Fill your ad unit details and press CREATE AD UNIT button:

Interstitial Video and Interstitial Ad

  • After pressing ADD AD UNIT button select Interstitial

  • Fill your ad unit details and press CREATE AD UNIT button:

Create Mediation Group for YouAppi Rewarded Video

  • Choose Mediation tab and press CREATE MEDIATION GROUP button.
  • Fill mediation group details and press CONTINUE:

  • Fill mediation group details and press ADD AD UNITS to connect your mediation group with the rewarded video ad unit.

  • Press DONE to add the ad unit.
  • After the popup is closed and the ad unit is selected, on Ad Sources section press ADD CUSTOM EVENT button.
  • On the popup name your custom event, fill relevant eCPN and press CONTINUE:

  • On the next popup fill the class name of YouAppi rewarded video custom event: YAAdMobRewardedVideoAdEvent
  • The custom event classes are found in the SDK zip file in the package named: youappi-sdk-ios-admob.zip.
  • Press DONE to save the custom event.
  • Press SAVE to create the new mediation group.

Create Mediation Group for YouAppi Interstitial Video and Interstitial Ad

  • Choose Mediation tab and press CREATE MEDIATION GROUP button.
  • Fill mediation group details and press CONTINUE:

  • Fill mediation group details and press ADD AD UNITS to connect your mediation group with the interstitial ad and interstitial video ad units.

  • Press DONE to add the ad unit.
  • After the popup is closed and the ad unit is selected, on Ad Sources section press ADD CUSTOM EVENT button.
  • On the popup name your custom event, fill relevant eCPN and press CONTINUE:

  • On the next popup fill the class name of YouAppi rewarded video custom event: YAAdMobIntertitialVideoAdEvent or YAAdMobIntertitialAdEvent.
  • The custom event classes are found in the SDK zip file in the package named: youappi-sdk-ios-admob.zip.

  • Press DONE to add the ad unit.
  • Press SAVE to create the new mediation group.

Use MoPub SDK to show YouAppi ad units

Rewarded Video

Load

[GADRewardBasedVideoAd sharedInstance].delegate = self;
[[GADRewardBasedVideoAd sharedInstance] loadRequest:[GADRequest request] withAdUnitID:@"Ad Unit ID From AdMob"];

Show

if ([[GADRewardBasedVideoAd sharedInstance] isReady]) {
  [[GADRewardBasedVideoAd sharedInstance] presentFromRootViewController:self];
}

Interstitial Video

Load

self.interstitialVideoAdMob = [[GADInterstitial alloc] initWithAdUnitID:@"Ad Unit ID From AdMob"];
GADRequest *request = [GADRequest request];
[self.interstitialVideoAdMob loadRequest:request];

Show

if (self.interstitialVideoAdMob.isReady) {
  [self.interstitialVideoAdMob presentFromRootViewController:self];
}

Interstitial Ad

Load

self.interstitialAdAdMb = [[GADInterstitial alloc] initWithAdUnitID:@"Ad Unit ID From AdMob"];
GADRequest *request = [GADRequest request];
[self.interstitialAdAdMb loadRequest:request];

Show

if (self.interstitialAdAdMb.isReady){
  [self.interstitialAdAdMb presentFromRootViewController:self];
}