未安装GoogleMobileAds SDK iOS的GADInvalidInitializationException

时间:2019-05-30 12:26:33

标签: ios xcode firebase react-native ads

我正在构建一个本机应用程序,我不打算展示广告,但是具有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应用程序标识符的原因,因为广告将不会显示在应用程序中。

0 个答案:

没有答案