找不到广告网络适配器

时间:2017-01-13 11:09:24

标签: ios swift admob adcolony vungle-ads

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

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

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

这是我初始化AdMob的方式:

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

然后当我调用此方法加载add:

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

这是我收到的错误:

<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.

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

1 个答案:

答案 0 :(得分:3)

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