gpt4 book ai didi

ios - 无法在我的 iOS 应用上显示 Google 插页式广告

转载 作者:行者123 更新时间:2023-12-04 08:30:34 24 4
gpt4 key购买 nike

我已经使用以下代码在我的 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)

}

}
当我运行测试广告时,我能够看到插页式广告!但是,在用我的插页式广告单元 ID 替换测试 ID 后,我无法在我的 iOS 应用程序上看到实时插页式广告。有人可以帮我解决这个问题吗?谢谢:)
这些是在我的 iOS 设备上运行我的应用程序后的日志:-
enter image description here

最佳答案

您必须按照 google documentation 使用如下测试 ID 测试您的 Google 广告.
插页式测试 ID

ca-app-pub-3940256099942544/4411468910


添加测试 ID 并重试。

关于ios - 无法在我的 iOS 应用上显示 Google 插页式广告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65047196/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com