我正在尝试使用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 …Run Code Online (Sandbox Code Playgroud)