TOP > Mediation Adapter
The module MediationAdapter
is a SDK to serve ad with other SDK product through the mediation feature.
Currently we support the ad banner feature of GoogleAdsMobile
SDK.
Get the ad Unit ID ready from the market side and follow the introduction to implement the GADBanner
in the App.
Ask market side to enable the configuration of the Admob Mediation. The following 2 steps must be done.
-
set up a mediation group
-
add ad custom event and map it with class name
GADMediationAdapterRunaCustomEvent
as the ad source.
- CocoaPods Edit the Podfile to contains the following configuration if using Cocoapods.
source "https://github.com/rakuten-ads/Rakuten-Ads-iOS"
pod 'RUNA/MediationAdapter'
Add repository URL of https://github.com/rakuten-ads/Rakuten-Ads-iOS
in Xcode,
and add package RUNAMediationAdapter
to the target project.
MediationAdapter
has been supported from RUNA SDK version 1.16.0
.
The RUNAMediationAdapter
SDK dependents on GoogleAdsMobile
SDK, but since the SPM is not recommended by GoogleAdsMobile
currently,
RUNAMediationAdapter
doesn't strict the dependency relation in the declare file while let developers to decide the method to import GoogleAdsMobile
SDK.
Configure the essential parameters in the class RUNAAdParameter
for RUNABanner
and register it to GAD by GADAdNetworkExtras
protocol.
// set parameters for RUNA
var parameters = RUNAAdParameter()
parameters.adSpotId = "00000"
let extras = GADMediationAdapterRunaExtras()
extras.adParameter = parameters
// register the GADAdNetworkExtras before loading ad
req.register(extras)
current supported parameters
- adSpotId
- adSpotCode
- adSpotBranchId
- rz
- rp
- easyId
- rpoint
- customTargeting
- genre
Details of the values can be found in Banner Ad
// create GADRequest
let req = GADRequest()
// set parameters for RUNA
var parameters = RUNAAdParameter()
parameters.adSpotId = "00000"
let extras = GADMediationAdapterRunaExtras()
extras.adParameter = parameters
// register the GADAdNetworkExtras
req.register(extras)
// GADBannerView load
bannerView.load(req)
// create GADRequest
let req = GADRequest()
// set parameters for RUNA
var parameters = RUNAAdParameter()
parameters.adSpotId = "00000"
parameters.rz = "rzcookie"
let extras = GADMediationAdapterRunaExtras()
extras.adParameter = parameters
// register the GADAdNetworkExtras
req.register(extras)
// GADBannerView load
bannerView.load(req)
LANGUAGE :