【发布时间】:2017-08-09 08:16:18
【问题描述】:
我用 xcode 制作了一个 iOS 应用程序,我正在使用 webview,我已经实现了 google admob 横幅广告,但现在我也想在我的应用程序中显示插页式广告而不点击任何按钮,我的意思是当我的网址加载插页式广告时显示。我正在使用此代码,但不起作用
interstitial = GADInterstitial(adUnitID: "")
let request = GADRequest()
// Request test ads on devices you specify. Your test device ID is printed to the console when
// an ad request is made.
request.testDevices = [ kGADSimulatorID, "2077ef9a63d2b398840261c8221a0c9b" ]
interstitial.load(request)
if interstitial.isReady {
interstitial.present(fromRootViewController: self)
} else {
print("Ad wasn't ready")
}
在 AppDelegate.m 中
FirebaseApp.configure()
但是广告没有显示,我在 xcode 日志中看不到任何错误,请帮助我,谢谢
【问题讨论】:
标签: ios xcode firebase admob interstitial