gpt4 book ai didi

xcode - iOS12 adMob 奖励视频 : test ad not working

转载 作者:行者123 更新时间:2023-12-03 16:56:35 24 4
gpt4 key购买 nike

直到昨天晚上,AdMob 测试广告运行良好,但突然停止运行。我已经尝试了针对类似问题提出的所有解决方案,但我仍然遇到相同的错误:

WF: === Starting WebFilter logging for process
WF: _userSettingsForUser mobile: {
filterBlacklist = (
);
filterWhitelist = (
);
noOverridingAllowed = 1;
restrictWeb = 1;
useContentFilter = 0;
useContentFilterOverrides = 0;
whitelistEnabled = 0;
}
WF: _WebFilterIsActive returning: NO
<Google> Cannot find an ad network adapter with the name(s): com.google.DummyAdapter. Remember to link all required ad network adapters and SDKs, and set -ObjC in the 'Other Linker Flags' setting of your build target.

我认为代码是正确的,并且我使用的是 Google 提供的正确测试 ID。我在装有 iOS12 的测试设备上运行代码,并且我已将 Google 移动广告 SDK 更新到最新版本:7.33.1。

这是我正在使用的代码:

应用委托(delegate):

func application(_ application:UIApplication,didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {GADRequest().testDevices = [ "2077ef9a63d2b398840261c8221a0c9b" ]
GADMobileAds.configure(withApplicationID: "ca-app-pub-3940256099942544~1458002511")
GADRewardBasedVideoAd.sharedInstance().delegate = self
GADRewardBasedVideoAd.sharedInstance().load(GADRequest(), withAdUnitID: "ca-app-pub-3940256099942544/1712485313")
return true
}
func rewardBasedVideoAd(_ rewardBasedVideoAd: GADRewardBasedVideoAd, didRewardUserWith reward: GADAdReward) {
let firstController = window?.rootViewController as! ViewController
firstController.plusOneLife()
}

func rewardBasedVideoAdDidClose(_ rewardBasedVideoAd: GADRewardBasedVideoAd) {
GADRewardBasedVideoAd.sharedInstance().load(GADRequest(), withAdUnitID: "ca-app-pub-3940256099942544/1712485313")
}

func rewardBasedVideoAd(_ rewardBasedVideoAd: GADRewardBasedVideoAd,
didFailToLoadWithError error: Error) {
print("Reward based video ad failed to load.")
}

View Controller :

    @IBAction func watchAd(_ sender: Any) {
if GADRewardBasedVideoAd.sharedInstance().isReady == true {
GADRewardBasedVideoAd.sharedInstance().present(fromRootViewController: self)
}
}

有没有人有解决办法?

最佳答案

我相信你和我有同样的问题,这是在谷歌的一端。

我已经联系了他们,您可以在下面的链接中查看进度

https://groups.google.com/forum/#!category-topic/google-admob-ads-sdk/ios/f-W_HmEndw4

关于xcode - iOS12 adMob 奖励视频 : test ad not working,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52444620/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com