我正在构建一个本机应用程序,我不打算展示广告,但是具有Firebase身份验证和其他相关服务。令我惊讶的是,我一直在下面收到此错误。会发生什么?
*** Terminating app due to uncaught exception
'GADInvalidInitializationException', reason: 'The Google Mobile Ads SDK
was initialized incorrectly. Google AdMob publishers should follow
instructions here: https://googlemobileadssdk.page.link/admob-ios-
update-plist to include the AppMeasurement framework, set the -ObjC
linker flag, and set GADApplicationIdentifier with a valid App ID.
Google Ad Manager publishers should follow instructions here:
https://googlemobileadssdk.page.link/ad-manager-ios-update-plist'
我found解决此错误的方法是通过添加来更新info.plist
<key>GADIsAdManagerApp</key>
<true/>
这解决了错误问题,但没有解决基本问题,这就是为什么它需要GAD应用程序标识符的原因,因为广告将不会显示在应用程序中。