-
Notifications
You must be signed in to change notification settings - Fork 2
MoPub Mediation
To use HyBid SDK directly in MoPub Mediation you will need to integrate the MoPub SDK and the HyBid SDK into your app.
Download and install the MoPub iOS SDK as described in the MoPub Wiki.
To integrate the HyBid SDK follow the instruction in the integration page.
There are 2 ways that you can install MoPub Adapters into your application;
To use the MoPub Adapter in your project, head over to MoPub HyBid Adapters repository and import all the adapter files to your project.
To use the MoPub Adapter in your Swift project, ensure that you have a Bridging Header file in your project and the Objective-C Bridging Header build setting under Swift Compiler - Code Generation has a path to the header
- If you're using CocoaPods, you can add the MoPub adapters to your project using
Podfile
. Check the listed repository for a detailed integration guide for MoPub HyBid adapters.
You can find a demo app with code samples for this type of integration here.
To set up the HyBid Adapters in the MoPub mediation you need to follow a few steps.
If you already have an app and ad units created then you can skip those parts.
Create a new app in the MoPub Dashboard
Create a new ad unit and set up the format as Leaderboard (728x90)
After this step, you will obtain an Ad Unit Id. Use this to request ads for this placement.
Create a new ad unit and set up the format as Banner (320x50)
After this step, you will obtain an Ad Unit Id. Use this to request ads for this placement.
Create a new ad unit and set up the format as Medium (300x250)
After this step, you will obtain an Ad Unit Id. Use this to request ads for this placement.
Create a new ad unit and set up the format as Fullscreen
After this step, you will obtain an Ad Unit Id. Use this to request ads for this placement.
Create a new ad unit and set up the format as Native
After this step, you will obtain an Ad Unit Id. Use this to request ads for this placement.
Go to the Networks tab on the MoPub Dashboard. Select the option to add a new network. Select Custom SDK Network.
On the App and Ad Unit setup section of the network creation dialog, navigate the list of app all the way to the app and ad units where you want to set up HyBid adapters.
Insert for each format the following custom event names and params:
-
Custom event for Leaderboard:
HyBidMoPubMediationLeaderboardCustomEvent
-
Custom event for Banner:
HyBidMoPubMediationBannerCustomEvent
-
Custom event for MRect:
HyBidMoPubMediationMRectCustomEvent
-
Custom event for Interstitial:
HyBidMoPubMediationInterstitialCustomEvent
-
Custom event for Rewarded:
HyBidMoPubMediationRewardedAdCustomEvent
-
Custom event for Native:
HyBidMoPubMediationNativeAdCustomEvent
Parameters to set up:
{
"pn_app_token": "YOUR PUBNATIVE APP TOKEN",
"pn_zone_id": "YOUR PLACEMENT ZONE ID"
}
After setting up the network. Activate it for the app in the Segments tab in the MoPub Dashboard
Set up the proper floor eCPM and make sure the network is enabled for all the required Ad units.
Ads should be requested using the regular MoPub process using the generated Ad Unit Ids. You can find the instructions in the MoPub developers page.
Please note: to complete implementation, the HyBid SDK needs to be initialized. Follow the HyBid integration guide and complete this step.