Page tree
Skip to end of metadata
Go to start of metadata

Code Integration

Steps for iOS 

  1. Download the Google Admob SDK from
  2. Add mediation library to the same folder. Download it from DFP Mediation Library.
  3. Create a folder (any name like library) and add the above downloaded SDK into it.
  4. Add this folder to your sample project. Please see below:

    Adding library to sample Project
    Figure 1 Adding library to sample Project

  5. The code highlighted below in the screenshot can be copied below:

    Figure 2 Library added successfully

  6. Copy highlighted code in the above screen from the following box below:


    NSString *udid = [[[UIDevice currentDevice] identifierForVendor] UUIDString];
     GADRequest *request = [GADRequest request];
     // Make the request for a test ad. Put in an identifier for the simulator as well as any devices
     // you want to receive test ads.
     request.testDevices = @[
  7. Add your publisher ID.

  8. Run the application and the Ad will look like this:

    Figure 4 Ad on iOS device


If you are adding a MREC ad, use Vdopia supported 320 x 250 size instead of the usual 300 x 250 size provided by Google.

CGSize customadSize = CGSizeMake(320, 250);
GADAdSize customad = GADAdSizeFromCGSize(customadSize);



  • No labels