iosswiftadmobadcolonyvungle-ads

Cannot find an ad network adapter


I am trying to implement ads in my app, using AdMob and mediation ad networks. But I've encountered the following problem, AdMob cannot find two of the three network adapters. I've find a few similar posts here on StackOverflow but none of them gives a clear answer how to fix this problem.

In the AdMob panel I've added Vungle, AdColony and ChartBoost. And when I call loadAd, it only can find the adapters for ChartBoost. But I've included the adapters for Vungle and AdColony also.

I've also linked all SDKs and network adapters and set the Other Linker Flags

This is how I initialize AdMob:

FIRApp.configure()
GADMobileAds.configure(withApplicationID: "MY_AD_ID")

Then when I call this method to load an add:

func loadAd() {
    if !GADRewardBasedVideoAd.sharedInstance().isReady {
        let request = GADRequest()
        GADRewardBasedVideoAd.sharedInstance().load(request, withAdUnitID: "MY_AD_UNIT_ID")
    }
}

And this is the error I am receiving:

<Google> Cannot find an ad network adapter with the name(s): GADMAdapterVungleRewardBasedVideoAd. Remember to link all required ad network adapters and SDKs, and set -ObjC in the 'Other Linker Flags' setting of your build target.

<Google> Cannot find an ad network adapter with the name(s): GADMAdapterAdColony. Remember to link all required ad network adapters and SDKs, and set -ObjC in the 'Other Linker Flags' setting of your build target.

Here is an image of the added adapters: https://i.sstatic.net/S5aEx.jpg


Solution

  • For others who may be having this issue, check to make sure that your ad unit ID is correct. In my case, I was using the testing ID for Android instead of the iOS ID. Changing it fixed the issue!