实时Admob广告突然停止在我的应用中显示 [英] Live Admob Ads have suddenly stopped displaying in my app

查看:83
本文介绍了实时Admob广告突然停止在我的应用中显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

6月份,Admob广告完美运行,AdMob向我发送了一封带有验证码的邮件,供我验证自己的身份和身份.付款明细.

在7月初前后,几乎所有实时广告都停止在我的应用中展示.我仍在发出相同数量的请求,但印象太少,以至于我每天的费用降到了0.00英镑/0.01英镑.所有测试广告都能正常运行.

这个问题始于我重命名应用程序的时间(仅在应用程序商店的显示屏上);AdMob帐户中指向我的应用程序的所有链接都是正确的,因此名称更改似乎对其前端用户界面没有影响.

调试应用程序时,在输出部分会显示警告列表:

  1. [I-ACS025031] AdMob应用ID已更改.原始的,新的:(无), AppId

我的info.plist中的"GADApplicationIdentifier"值与新"应用程序ID相同.

  1. [I-ACS013003]用户属性名称必须以字母开头:_ap

我没有设置任何用户属性,不知道这意味着什么.

我尝试了什么?

  1. 设置新的广告单元.

  2. 恢复到旧版本的应用程序.

  3. 通过表格联系了AdMob支持".他们告诉我,我的广告投放受到限制.他们没有说多久,已经大约2/3周了(有限",我不认为他们意味着完全停止了.)

  4. 已检查我的帐户中是否存在违反政策的情况;什么都没有.

我用于展示广告的代码:

我创建了一个"AdMobDisplayer"类,该类允许我设置和展示广告;这由每个视图控制器调用.例如,我的横幅广告代码:

View Controller:

 让adMobDisplayer = AdMobDisplayer()@IBOutlet弱var bannerView:GADBannerView!覆盖func viewDidLoad(){super.viewDidLoad()self.bannerView = self.adMobDisplayer.setupAdBannerView(self.bannerView,viewController:self,adUnitId:Constants.timerTabBannerAdId)self.adMobDisplayer.displayBannerAd(self.bannerView)} 

AdMobDisplayer:

 func setupAdBannerView(_ bannerView:GADBannerView,viewController:UIViewController,adUnitId:String,bannerViewDelgate:GADBannerViewDelegate?= nil)->GADBannerView {if(checkIfAdsAreDisabled()){返回bannerView}///创建一个新的GADBannerView,以显示在视图控制器中bannerView.adUnitID = adUnitId///bannerView.adUnitID = Constants.testBannerAdIdbannerView.rootViewController = viewController如果让委托= bannerViewDelgate {bannerView.delegate =委托}返回bannerView}func displayBannerAd(_ bannerView:GADBannerView){if(checkIfAdsAreDisabled()){返回}///创建请求并从AdMob加载广告让请求= GADRequest()request.testDevices = [我的设备ID"]bannerView.load(请求)} 

这应该在视图中显示横幅广告.当我第一次添加广告时,它就起作用了,它适用于测试广告,但是现在间歇地/很少地用于实时广告.

在我的GitHub上找到完整的应用程序: https://github.com/AlexMarchant98/KeGal-Trainer

在此先感谢您的帮助!

解决方案

所以我很久以前就解决了这个问题,但是,我的解决方法是将必需的"NSAppTransportSecurity"键添加到我的info.plist中.

https://developers.google.com/admob/ios/app-transport-security

In June, Admob adverts worked perfectly and AdMob sent a letter with a verification PIN for me to verify my identity & payment details.

Around the beginning of July, nearly all live ads stopped displaying in my app. I am still making the same number of requests, but impressions are so low I have dropped to £0.00/£0.01 a day. All test ads work correctly.

This issue began around the time I renamed my app (only on the app store display), however; all links to my app in my AdMob account are correct so the name change appears to have made no difference on their front-end UI.

When I debug my app, I get a list of warnings in the output section:

  1. [I-ACS025031] AdMob App ID changed. Original, new: (nil), AppId

My 'GADApplicationIdentifier' value in my info.plist is the same as the 'new' app id.

  1. [I-ACS013003] User property name must start with a letter: _ap

I am not setting any user properties, no idea what this means.

What have I tried?

  1. Setting up new ad units.

  2. Reverting back to an older version of the app.

  3. Contacted AdMob 'support' via a form. They told me my ad serving is being limited. They did not say for how long and it has been around 2/3 weeks (by 'limited', I don't think they meant completely stopped).

  4. Checked for policy violations in my account; nothing is there.

Code I use to display ads:

I have created an 'AdMobDisplayer' class that allows me to set up and display ads; this is called by each view controller. For example, my banner ads code:

View Controller:

    let adMobDisplayer = AdMobDisplayer()

    @IBOutlet weak var bannerView: GADBannerView!

    override func viewDidLoad() {
        super.viewDidLoad()

        self.bannerView = self.adMobDisplayer.setupAdBannerView(self.bannerView, viewController: self, adUnitId: Constants.timerTabBannerAdId)

        self.adMobDisplayer.displayBannerAd(self.bannerView)

    }

AdMobDisplayer:


    func setupAdBannerView(_ bannerView: GADBannerView, viewController: UIViewController, adUnitId: String, bannerViewDelgate: GADBannerViewDelegate? = nil) -> GADBannerView {

        if(checkIfAdsAreDisabled()) {
            return bannerView
        }
/// Creates a new GADBannerView to be displayed in a view controller
        bannerView.adUnitID = adUnitId
        /// bannerView.adUnitID = Constants.testBannerAdId
        bannerView.rootViewController = viewController

        if let delegate = bannerViewDelgate {
            bannerView.delegate = delegate
        }

        return bannerView
    }

    func displayBannerAd(_ bannerView: GADBannerView) {
        if(checkIfAdsAreDisabled()) {
            return
        }
///Creates a request and loads an advert from AdMob
        let request = GADRequest()
        request.testDevices = [ "My Device Id" ]
        bannerView.load(request)
    }

This should display a banner ad in the view. It worked when I first added adverts in, it works for test adverts, but intermittently/rarely for live adverts now.

Find the full application on my GitHub: https://github.com/AlexMarchant98/KeGal-Trainer

Thanks in advance for any help!

解决方案

So I fixed this ages ago, but, my fix was to add the required 'NSAppTransportSecurity' keys into my info.plist.

https://developers.google.com/admob/ios/app-transport-security

这篇关于实时Admob广告突然停止在我的应用中显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆