[英]Unable to display Google Interstitial Ads on my iOS App
I have integrated the google AdMob interstitial ads in my iOS App using the following code:-我已使用以下代码在我的 iOS 应用程序中集成了谷歌 AdMob 插页式广告:-
import GoogleMobileAds
class ViewController: UIViewController, GADInterstitialDelegate {
var interstitial: GADInterstitial!
override func viewDidLoad() {
super.viewDidLoad()
interstitial = GADInterstitial(adUnitID: "")
interstitial.delegate = self
let request = GADRequest()
interstitial.load(request)
}
// Google Ads
func interstitialDidReceiveAd(_ ad: GADInterstitial) {
interstitial.present(fromRootViewController: self)
}
}
When I run test ads, I am able to see the interstitial ads, But, after replacing the test ID with my Interstitial Ad Unit ID.当我运行测试广告时,我可以看到插页式广告,但是,将测试 ID 替换为我的插页式广告单元 ID 后。 I cannot see the live interstitial ads on my iOS app?我在 iOS 应用程序上看不到实时插页式广告? Could anyone please help me to resolve this issue: Thanks:)谁能帮我解决这个问题:谢谢:)
These are the logs after running my app on my iOS Device:-这些是在我的 iOS 设备上运行我的应用程序后的日志:-
You must test your google ads with test id like below as per google documentation .您必须按照谷歌文档使用如下测试 ID 测试您的谷歌广告。
Interstitial Test id插页式测试 ID
ca-app-pub-3940256099942544/4411468910 ca-app-pub-3940256099942544/4411468910
Adding test id and try again.添加测试 ID 并重试。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.