I try to use mediation in my application and it only works for the adapters of AdColony, not the other networks I have added (without extra adapters required)
my code
func prepareAdNetwork() {
let ads = GADMobileAds.sharedInstance()
ads.start { status in
let adapterStatuses = status.adapterStatusesByClassName
for adapter in adapterStatuses {
let adapterStatus = adapter.value
print("Adapter Name: %@, Description: %@, Latency: %f", adapter.key, adapterStatus.description, adapterStatus.latency)
}
self.adLoader = GADAdLoader(adUnitID: self.adUnitID, rootViewController: self.window?.rootViewController, adTypes: [.native], options: nil)
self.adLoader.delegate = self
self.configureAds()
self.loadFullScreenAds()
}
}
the configureAds is just sending the request
if adLoader != nil {
self.adLoader.load(GADRequest())
}
the result
Adapter Name: %@, Description: %@, Latency: %f GADMAdapterGoogleAdMobAds <GADAdapterStatus: 0x120a6b940; state = Not Ready;No such adapter in the application.> 0.0 Adapter Name: %@, Description: %@, Latency: %f GADMediationAdapterAdColony <GADAdapterStatus: 0x162505140; state = Ready> 0.5974940061569214 Adapter Name: %@, Description: %@, Latency: %f GADMobileAds <GADAdapterStatus: 0x120a6ba00; state = Ready> 0.07822108268737793 Adapter Name: %@, Description: %@, Latency: %f GADMediationAdapterFacebook <GADAdapterStatus: 0x162537000; state = Ready> 1.151913046836853
I guess the error is the reason for the mediation to not work properly. However, I have gone through the tutorial multiple times and I don't know what I am doing wrong. It seems that I am missing a pod file which I have to include but don't know which one
the currently included ones (and updated today) are:
pod 'Google-Mobile-Ads-SDK'
pod 'GoogleUtilities', '~> 7.11.0'
pod 'GoogleMobileAdsMediationAdColony'
pod 'GoogleMobileAdsMediationFacebook'
Any idea how what is wrong? Normal ads and from adcolony work fine...