iOS12 adMob 奖励视频:测试广告不起作用
Posted
技术标签:
【中文标题】iOS12 adMob 奖励视频:测试广告不起作用【英文标题】:iOS12 adMob Rewarded video: test ad not working 【发布时间】:2018-09-21 13:16:47 【问题描述】:直到昨天晚上 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 Mobile Ads SDK 更新到最新版本:7.33.1。
这是我正在使用的代码:
AppDelegate:
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.")
视图控制器:
@IBAction func watchAd(_ sender: Any)
if GADRewardBasedVideoAd.sharedInstance().isReady == true
GADRewardBasedVideoAd.sharedInstance().present(fromRootViewController: self)
有人有解决办法吗?
【问题讨论】:
【参考方案1】:我相信你和我有同样的问题,它是在谷歌的一端。
我已与他们取得联系,您可以在下面的链接中监控进度
https://groups.google.com/forum/#!category-topic/google-admob-ads-sdk/ios/f-W_HmEndw4
【讨论】:
以上是关于iOS12 adMob 奖励视频:测试广告不起作用的主要内容,如果未能解决你的问题,请参考以下文章
Admob 测试广告不起作用,只有真实的广告在显示 - Android