我的应用上线已经快一周了,但我的实时 Google 广告根本没有展示。
我已经尝试仔细检查我能想到的所有内容,例如确保应用 ID 和广告 ID 正确无误,但我对它们并不走运。
我有以下两个功能来加载和显示广告
public func loadAd() {
interstitial = GADInterstitial(adUnitID: "ca-app-pub-3228561607874346/1546949023") //Live Ad 2
let request = GADRequest()
interstitial.load(request)
}
public func showAd() {
if (interstitial.isReady) {
interstitial.present(fromRootViewController: self)
loadAd()
} else {
print("Ad wasn't ready")
}
}
我尝试使用 Google 教程页面上提供给我的测试广告 ID 来运行测试广告,这似乎运行良好,只是我的实时广告不行。唯一标记或引起我注意的是控制台正在打印:
[I-ACS023136] Configuration does not have valid Google App ID.
和
[I-ACS034010] Transaction failed
但就像我说的,我在 info.plist 文件中仔细检查了我的配置,一切似乎都很好。
有超过 200 个请求和 0% 的匹配率。我只是不知道它可能是什么。
最佳答案
我做了一些研究,大多数人通过等待几天解决了与 AdMob 相关的问题。由于您的应用程序在一个多星期前上线,我相信这不是问题。另一种可能的解决方案是与更多人共享您的应用程序,以便向 Google 服务器发送更多请求。根据 this回答:
For newly created ads to work, Admob need more requests to start showing ads.
还:
一个不太可能但可能的原因可能是缺乏库存。
如果上述方法均无效,您可以尝试以下疑难解答:
Performance Troubleshoot - Can't see ADS Troubleshoot
更多信息:
Common reasons for ads not showing
关于ios - Google AdMob 返回 "Configuration does not have valid Google App ID",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64719128/