Ios AdMob bannerView在遵循文档后不显示

Ios AdMob bannerView在遵循文档后不显示,ios,swift,admob,Ios,Swift,Admob,我正在尝试在我的应用程序中显示广告,我选择了AdMob。我已经按照他们在文件中写的做了一切 我将此添加到AppDelegate: GADMobileAds.sharedInstance().start(completionHandler: nil) 我还将此代码添加到了viewDidLoad: override func viewDidLoad(){ super.viewDidLoad() setUpView() adBannerView.adUnitID=“ca-app-pub-394025

我正在尝试在我的应用程序中显示广告,我选择了AdMob。我已经按照他们在文件中写的做了一切

我将此添加到
AppDelegate

GADMobileAds.sharedInstance().start(completionHandler: nil)
我还将此代码添加到了
viewDidLoad

override func viewDidLoad(){
super.viewDidLoad()
setUpView()
adBannerView.adUnitID=“ca-app-pub-3940256099942544/2934735716”
adBannerView.rootViewController=self
adBannerView.load(GADRequest())
}
adBannerView
main.storyboard
中的
UIView
,它将
GADBannerView
作为子类(也通过
@IBOutlet
连接) 但是,该广告没有在模拟器中显示。我每隔一段时间就会收到此错误消息(可能是在刷新时)

2020-10-05 19:36:47.683540+0200学习化学[38879:1067024]WF:_用户设置密码:(空)
2020-10-05 19:36:47.683687+0200学习化学[38879:1067024]WF:_webfilter活动返回:否
2020-10-05 19:36:50.123788+0200学习化学[38879:1067024][Process]0x7fd3fe019420-[pageProxyID=31,webPageID=32,PID=39055]WebPageProxy::DidFailsTemporaryLoadForFrame:frameID=3,domain=NSURlerErrorDomain,code=-1200
2020-10-05 19:36:50.164032+0200学习化学[38879:1067024][断言]获取断言时出错:
2020-10-05 19:36:50.164192+0200学习化学[38879:1067024][ProcessSuspension]0x147efe1c0-ProcessAssertion:无法为PID为39055的流程获取RBS后台断言“WebProcess后台断言”,错误:错误域=RBSAssertionErrorDomain代码=3“目标未运行或缺少所需的目标权限”用户信息={RBSAssertionAttribute=,NSLocalizedFailureReason=目标未运行或缺少所需的目标权限}
2020-10-05 19:36:50.174754+0200学习化学[38879:1067024][断言]获取断言时出错:
2020-10-05 19:36:50.174900+0200学习化学[38879:1067024][ProcessSuspension]0x147efe240-ProcessAssertion:无法获取PID 39055流程的RBS后台断言“WebProcess后台断言”,错误:错误域=RBSAssertionErrorDomain代码=2“指定的目标流程不存在”用户信息={NSLocalizedFailureReason=指定的目标进程不存在}
2020-10-05 19:37:20.127313+0200学习化学[38879:1067024]无法向服务com.apple.WebKit.WebContent发送信号:113:找不到指定的服务
我做错什么了吗

多谢各位


BSM

您需要确保您的项目中有Google plist,并且您应该在应用程序开发期间使用测试广告。您不希望adUnitId在测试时显示真实的添加,因为如果您单击它们,您将被挂起。还需要一段时间才能用新应用程序验证您的帐户。此外,错误日志doe不要提及Admob,除非我错过了soemthing。@LucasDahl我在哪里可以找到
PList
?我知道当我将firebase添加到一个项目中时,我会将其作为下载的一个步骤。但Admob没有。很抱歉,我错用了firebase。你需要做的是在你的p中添加GADApplicationIdentifier列表文件。很抱歉迟了回复@LucasDahl,但这很有效!thx a ton!@bruno bieri,我很想回答我自己的问题,但我做了一些事情,直到今天我都不记得是什么做的。如果我找到了,我会把它发布在这里。]你需要确保你的项目中有谷歌plist,并且你应该在ap时使用测试广告p正在开发中。您不希望adUnitId在测试时显示真实的添加,因为如果单击它们,您将被挂起。使用新应用验证您的帐户也需要一些时间。此外,错误日志中没有提到任何关于Admob的内容,除非我错过了soemthing。@LucasDahl我在哪里可以找到
PList
?我知道当我将firebase添加到一个项目中时,我会将其作为下载的一个步骤。但adMobIm没有这样做。很抱歉,我使用firebase时出错了。你需要做的是在你的plist文件中添加GADApplicationIdentifier。很抱歉,回复太晚了@LucasDahl,但这很有效!thx a tone!@bruno bieri,我很乐意回答我自己的问题n、 但是我做了一些事情,直到今天我都不记得是什么做的。如果我找到了,我会把它贴在这里。]
2020-10-05 19:36:47.683540+0200 Learn Chemistry[38879:1067024] WF: _userSettingsForUser : (null)
2020-10-05 19:36:47.683687+0200 Learn Chemistry[38879:1067024] WF: _WebFilterIsActive returning: NO
2020-10-05 19:36:50.123788+0200 Learn Chemistry[38879:1067024] [Process] 0x7fd3fe019420 - [pageProxyID=31, webPageID=32, PID=39055] WebPageProxy::didFailProvisionalLoadForFrame: frameID = 3, domain = NSURLErrorDomain, code = -1200
2020-10-05 19:36:50.164032+0200 Learn Chemistry[38879:1067024] [assertion] Error acquiring assertion: <Error Domain=RBSAssertionErrorDomain Code=3 "Target is not running or required target entitlement is missing" UserInfo={RBSAssertionAttribute=<RBSDomainAttribute| domain:"com.apple.webkit" name:"Background" sourceEnvironment:"(null)">, NSLocalizedFailureReason=Target is not running or required target entitlement is missing}>
2020-10-05 19:36:50.164192+0200 Learn Chemistry[38879:1067024] [ProcessSuspension] 0x147efe1c0 - ProcessAssertion: Failed to acquire RBS Background assertion 'WebProcess Background Assertion' for process with PID 39055, error: Error Domain=RBSAssertionErrorDomain Code=3 "Target is not running or required target entitlement is missing" UserInfo={RBSAssertionAttribute=<RBSDomainAttribute| domain:"com.apple.webkit" name:"Background" sourceEnvironment:"(null)">, NSLocalizedFailureReason=Target is not running or required target entitlement is missing}
2020-10-05 19:36:50.174754+0200 Learn Chemistry[38879:1067024] [assertion] Error acquiring assertion: <Error Domain=RBSAssertionErrorDomain Code=2 "Specified target process does not exist" UserInfo={NSLocalizedFailureReason=Specified target process does not exist}>
2020-10-05 19:36:50.174900+0200 Learn Chemistry[38879:1067024] [ProcessSuspension] 0x147efe240 - ProcessAssertion: Failed to acquire RBS Background assertion 'WebProcess Background Assertion' for process with PID 39055, error: Error Domain=RBSAssertionErrorDomain Code=2 "Specified target process does not exist" UserInfo={NSLocalizedFailureReason=Specified target process does not exist}
2020-10-05 19:37:20.127313+0200 Learn Chemistry[38879:1067024] Could not signal service com.apple.WebKit.WebContent: 113: Could not find specified service