Flutter 与 AdMob(iOS 平台)的集成失败 - 与 GoogleServices 相关的错误

Flutter Integration with AdMob (iOS platform) failing - error related to GoogleServices

我正在尝试将 admob 插件添加到我的 flutter 应用程序中。进展不顺利。

问题是什么:

对于 iOS 版本,我在编译应用程序时收到错误消息:

path: satisfied (Path is satisfied), interface: en0
Configuring the default Firebase app...
6.11.0 - [Firebase/Core][I-COR000004] App with name __FIRAPP_DEFAULT does not exist.
6.11.0 - [Firebase/Core][I-COR000012] Could not locate configuration file: 'GoogleService-Info.plist'.
*** First throw call stack:
(
    0   CoreFoundation                      0x00007fff23c4f02e __exceptionPreprocess + 350
    1   libobjc.A.dylib                     0x00007fff50b97b20 objc_exception_throw + 48
    2   CoreFoundation                      0x00007fff23c4ee6c +[NSException raise:format:] + 188
    3   Runner                              0x000000010c0a6d1a +[FIRApp configure] + 138
    4   Runner                              0x000000010c106cb2 -[FLTFirebaseAdMobPlugin init] + 258
    5   Runner                              0x000000010c106a26 +[FLTFirebaseAdMobPlugin registerWithRegistrar:] + 70
    6   Runner                              0x000000010c0944d0 +[GeneratedPluginRegistrant registerWithRegistry:] + 112
    7   Runner                           <…>

我的配置是什么?

好吧,我已将我的 GoogleService-Info.plist 文件放在与 info.plist 文件相同的目录中。我什至不确定 admob 是否需要这个。这仅用于分析,我不需要分析..是吗?

对于 Android Admob 集成 - 看起来很简单。 我应该做什么?

我真的迷路了。不知道我还能做什么。

3。添加的包:

就我的包裹而言,这是我正在使用的:

  firebase_admob: ^0.9.0+9
  cloud_firestore: ^0.12.10
  firebase_analytics: ^5.0.6

**4。其他问题 **

在 Podfile 中,我是否应该取消注释:

# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'

?也许我也需要较低的型号才能工作?

这是一个常见的事情,我忘记在 Runner.xcworkspace

中添加 GoogleService-Info.plist

打开 Runner.xcworkspace 右键单击​​运行器并选择添加文件 select GoogleService-Info.plist