简体   繁体   English

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

[英]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.

相关问题 使用iOS9的Admob和插页式广告 - Admob and Interstitial Ads with iOS9 iOS - 横幅测试的 Google 广告问题未仅在我的应用中显示 - iOS - Google ads issue with banner test not showing in my app only 无法在我的 iOS swift 应用程序中添加 Google 原生广告 - Not able to add Google native ads in my iOS swift app Google DFP非页内广告和横幅广告可以在iOS中的同一广告单元ID中使用吗? - Google DFP Interstitial and Banner Ads will work in same Ad UNIT ID in iOS? Unity IOS 游戏不会在插页式广告上暂停 - Unity IOS game does not pausing on Interstitial ads 添加 Google 移动插页式广告 Swift - Adding Google Mobile Interstitial Ads Swift 如何在我的 iOS 应用中使用 Google Ads 并遵守 App Tracking Transparency - How to Use Google Ads with my iOS App and Comply with App Tracking Transparency 除了横幅广告 (IOS) 之外,还添加 AdMob 插页式广告 - Adding AdMob Interstitial ads in addition to banner ads (IOS) 适用于我的分类广告网站的iOS应用 - an iOS app for my classifieds ads website ios-AdMob插页式广告错误:“请求错误:无广告可显示”,但是更改包ID(NEW APP)时,为什么可以加载广告? - ios - AdMob interstitial error “Request Error: No ad to show”, but when change bundle ID(NEW APP), can load ads,why?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM