相关疑难解决方法(0)

Google AdMob 返回“配置没有有效的 Google App ID”

我的应用上线已经快一周了,但我的实时 Google 广告根本没有展示。

我已经尝试仔细检查我能想到的所有内容,例如确保 App ID 和 Ad ID 正确无误,但我对它们并不走运。

我有以下两个功能来加载和显示广告

public func loadAd() {
    interstitial = GADInterstitial(adUnitID: "ca-app-pub-3228561607874346/1546949023") //Live Ad 2
    let request = GADRequest()
    interstitial.load(request)
}

public func showAd() {
    
    if (interstitial.isReady) {
        interstitial.present(fromRootViewController: self)
        
        loadAd()
        
    } else {
      print("Ad wasn't ready")
    }
}
Run Code Online (Sandbox Code Playgroud)

我尝试使用 Google 教程页面上提供给我的测试广告 ID 来运行测试广告,这似乎运行良好,只是我的实时广告不行。

唯一标记或引起我注意的是控制台正在打印:

[I-ACS023136] 配置没有有效的 Google App ID。

[I-ACS034010] 交易失败

但就像我说的,我在 info.plist 文件中仔细检查了我的配置,一切似乎都很好。

有超过 200 个请求和 0% 的匹配率。我只是不知道它可能是什么。

mobile admob ios swift

5
推荐指数
1
解决办法
281
查看次数

标签 统计

admob ×1

ios ×1

mobile ×1

swift ×1