Integrating AdMob Mediation + Vungle SDK v.5 (iOS)


Before You Begin

Step 1. Set Up Vungle as an Ad Network

  1. Log into the AdMob dashboard and navigate to the Monetize tab.

  2. Choose the app to which you want to add Vungle as an ad network.

  3. Select the ad format and add the ad unit to your app.

    • For the Interstitial ad format, select the Video option, because all Vungle ads are video ads.


    • For Rewarded video ad format, select the Set a reward option and enter values in the Reward amount and Reward item fields. Vungle does not support the Use third-party ad network settings functionality.


  4. Choose you ad unit and click ad sources in the Mediation column.


  5. Click + New Ad Network.


  6. Select Vungle from the left panel and matching placement ID, available from Vungle dashboard.


Step 2. Integrate the Vungle Adapter and SDK

  1. Download the Vungle AdMob adapter and the Vungle SDK. Then add them to your project by placing them under the Frameworks folder.


    Make sure VungleSDK.framework and libVungleAdapter.a are included in the project's Build Phases → Link Binary With Libraries section.

  2. Follow the instructions in the “Add Other Required Frameworks“ section of “Get Started with Vungle - iOS SDK“ to add the necessary frameworks.

  3. Follow the instructions in the “Add the “-ObjC” Linker Flag“ section of “Get Started with Vungle - iOS SDK“ to add the linker flag.

  4. Follow the instructions in the “Remove the iOS Status Bar“ section of “Get Started with Vungle - iOS SDK“ to remove the status bar.

Step 3. Pass a Placement Reference ID to the Adapter

With Vungle SDK version 5, you must import VungleAdNetworkExtras.h and create a VungleAdNetworkExtras object to provide the placement reference ID and all placement reference IDs to the Vungle adapter. If you add Placement Reference ID in the AdMob Dashboard, you don’t have to specify the placement reference IDs in the VungleAdNetworkExtras class.

Note: A default placement is created for each app automatically. You must provide its placement reference ID in this initialization step whether or not you plan to take advantage of the placements functionality. If you create multiple placements, provide all the reference IDs

For Interstitial:

    self.interstitial = [[GADInterstitial alloc] initWithAdUnitID:@"AD_UNIT_ID"];
   self.interstitial.delegate = self;
   GADRequest *request = [GADRequest request];
   VungleAdNetworkExtras *extras = [[VungleAdNetworkExtras alloc] init];
   extras.allPlacements = @[@"PLACEMENT_ID_1", @"PLACEMENT_ID_2", @"PLACEMENT_ID_3"];
   extras.playingPlacement = @"PLACEMENT_ID_1";  // Optional if you provide through AdMob dashboard
   [request registerAdNetworkExtras:extras];
   [self.interstitial loadRequest:request];

For Rewarded Video:

    GADRequest *request = [GADRequest request];
   VungleAdNetworkExtras *extras = [[VungleAdNetworkExtras alloc] init];
   extras.allPlacements = @[@"PLACEMENT_ID_1", @"PLACEMENT_ID_2", @"PLACEMENT_ID_3"];
   extras.playingPlacement = @"PLACEMENT_ID_1"; // Optional if you provide through AdMob dashboard
   [request registerAdNetworkExtras:extras];
   [[GADRewardBasedVideoAd sharedInstance] loadRequest:request

Note about auto-cached ads: The Vungle SDK will cache an ad automatically for the placement you selected to be Auto Cached​ in the Vungle Dashboard. We highly recommend selecting the AdMob Ad Unit shown first or the Ad Unit shown most frequently as the Auto Cached placement.

Note about inability to play multiple rewarded ads: Starting with Google-Mobile-Ads-SDK 7.24.0, AdMob only supports one pre-cached rewarded video placement at a time.

Passing Additional Parameters (Optional)

You can use extra properties to customize ads.




Sets unique user ID to be passed to the Vungle SDK for use in server-to-server callback for Rewarded ads.


Sets the starting sound state for the ad. If set to YES, video begins with muted sound, but the user may modify it.


If you receive ordinal data reports from Vungle, use this field to pass the mediation ordinal. This is an integer indicating the order in which this ad was shown in the game session (for example, if two ads were already shown in this session, and this ad from Vungle was then shown third, pass in '3'). Read more about ordinal data here.


Set Flex View ads to automatically close in the specified amount of seconds.

GADRequest *request = [GADRequest request];
VungleAdNetworkExtras *extras = [[VungleAdNetworkExtras alloc] init];
extras.allPlacements = @[PLACEMENT_ID1, REWARDED_ID2, PLACEMENT_ID3];
extras.playingPlacement = REWARDED_ID2;
extras.userId = @"vungle_test_david";
extras.ordinal = 7;
extras.flexViewAutoDismissSeconds = 30;
[request registerAdNetworkExtras:extras];
[[GADRewardBasedVideoAd sharedInstance] loadRequest:request
Have more questions? Submit a request