首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >iOS12 adMob奖励视频:测试广告不起作用

iOS12 adMob奖励视频:测试广告不起作用
EN

Stack Overflow用户
提问于 2018-09-21 21:16:48
回答 1查看 576关注 0票数 3

直到昨天晚上,AdMob测试广告还在正常工作,但后来突然停止了工作。我已经尝试了针对类似问题提出的所有解决方案,但仍然收到相同的错误:

代码语言:javascript
复制
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:

代码语言:javascript
复制
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:

代码语言:javascript
复制
    @IBAction func watchAd(_ sender: Any) {
    if GADRewardBasedVideoAd.sharedInstance().isReady == true {
        GADRewardBasedVideoAd.sharedInstance().present(fromRootViewController: self)
    }
}

有谁有解决方案吗?

EN

回答 1

Stack Overflow用户

发布于 2018-10-01 21:20:18

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

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

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

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/52444620

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档