直到昨天晚上,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.")
}
ViewController:
@IBAction func watchAd(_ sender: Any) {
if GADRewardBasedVideoAd.sharedInstance().isReady == true {
GADRewardBasedVideoAd.sharedInstance().present(fromRootViewController: self)
}
}
有人可以解决吗?
答案 0 :(得分:0)
我相信您和我有同样的问题,这是Google的问题。
我已经与他们联系,您可以在下面的链接中监视进度
https://groups.google.com/forum/#!category-topic/google-admob-ads-sdk/ios/f-W_HmEndw4