gpt4 book ai didi

ios - 在我将我的 IOS 应用程序提交到 AppStore 后,AdMob 没有显示广告

转载 作者:行者123 更新时间:2023-11-28 07:38:05 25 4
gpt4 key购买 nike

当我在 Xcode 上编写我的 IOS 应用程序时,我使用 AdMob 转换广告在模拟器上测试期间AdMob 测试广告正确展示

但是

在我将应用程序提交到应用程序商店并发布应用程序之后当我从 appStore 下载应用程序时,没有添加我想知道下面的代码是否有问题

import GoogleMobileAds
var banner : GADBannerView! // Banner to the adds

var interstitial: GADInterstitial!
override func viewDidLoad() {
super.viewDidLoad()



banner = GADBannerView(adSize: kGADAdSizeSmartBannerPortrait)
banner.adUnitID = "ca-app-pub-8191182380005591/8534539***"
banner.rootViewController = self
let req : GADRequest = GADRequest()

banner.load(req)
banner.frame = CGRect(x:0 , y: view.bounds.height - banner.frame.size.height , width : banner.frame.size.width , height: banner.frame.size.height )

self.view.addSubview(banner)
//show add
self.interstitial = createAndLoadInterstitial()



}
//CREAT ADD
func createAndLoadInterstitial() -> GADInterstitial {
interstitial = GADInterstitial(adUnitID: "ca-app-pub-8191182380005591/338872***")
// guard let interstitial = interstitial else {
// return nil
//}

let request = GADRequest()
// request.testDevices = [kGADSimulatorID]
interstitial.delegate = self
interstitial.load(GADRequest())
return interstitial
}//FUNC



func interstitialDidReceiveAd(_ ad: GADInterstitial) {


ad.present(fromRootViewController: self)
}
func interstitialDidFail(toPresentScreen ad: GADInterstitial) {

}

这是我的代码此外,我将 AdMob 中的应用程序链接到 appStore 上的应用程序有没有人知道我的问题在哪里如果它不在我应该搜索的代码中

谢谢

最佳答案

发布应用 3 周后,我终于可以转换广告了

我认为一开始没有用户使用该应用,所以这就是为什么没有广告,但过了一段时间当人们开始下载该应用时,广告出现了

关于ios - 在我将我的 IOS 应用程序提交到 AppStore 后,AdMob 没有显示广告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52905570/

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