找不到广告网络适配器

Mar*_*r-k 6 admob ios adcolony swift vungle-ads

我正在尝试使用AdMob和中介广告网络在我的应用中实施广告.但是我遇到了以下问题,AdMob找不到三个网络适配器中的两个.我在StackOverflow上找到了一些类似的帖子,但没有一个给出了如何解决这个问题的明确答案.

在AdMob面板中,我添加了Vungle,AdColony和ChartBoost.当我调用loadAd时,它只能找到ChartBoost的适配器.但我也为Vungle和AdColony提供了适配器.

我还链接了所有SDK和网络适配器,并设置了其他链接器标志

这是我初始化AdMob的方式:

FIRApp.configure()
GADMobileAds.configure(withApplicationID: "MY_AD_ID")
Run Code Online (Sandbox Code Playgroud)

然后,当我调用此方法加载添加时:

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

这是我收到的错误:

<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.
Run Code Online (Sandbox Code Playgroud)

以下是添加的适配器的图像:http: //imgur.com/a/USP5N

Cha*_*tty 7

对于可能遇到此问题的其他人,请检查以确保您的广告单元 ID 正确。就我而言,我使用的是 Android 的测试 ID 而不是 iOS ID。更改它解决了问题!