ios - GADInvalidInitializationException 未安装 GoogleMobileAds SDK iOS
问题描述
我正在构建一个本机应用程序,我不打算显示广告,但我有 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'
我发现这个错误的方法是通过添加来更新 info.plist
<key>GADIsAdManagerApp</key>
<true/>
这解决了错误问题,但没有解决根本问题,这就是为什么它需要 GAD 应用程序标识符,因为广告不会显示在应用程序中。
解决方案
推荐阅读
- c# - 为什么 Bamboo 上的相对路径会失败?
- python - 在分隔符上递归拆分字符串
- excel - 在角度应用程序中显示 excel 文件
- rest - 有人见过 SPO REST API 的计时/同步问题吗?
- flutter - 为什么当项目计数设置为 2 时,我的 Listview.builder 会执行 4 次?
- android - 在安卓设备上录制视频时如何更改 CRF
- javascript - 在表格中使用箭头导航时,td 和标题重叠
- javascript - 如何使用 Sequelize 将值“null”插入 MariaDB?
- python - 图片未显示在 Google Colab 上使用 Python 和 Flask
- flutter - 将小部件与屏幕顶部对齐