Firebase设置后,Flutter ios应用程序崩溃 [英] flutter ios app crashes after firebase setup

查看:48
本文介绍了Firebase设置后,Flutter ios应用程序崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试为flutter ios应用程序配置Firebase,我已经下载了 GoogleService-Info.plist ,并将其添加到Xcode中的 Runner/Runner 文件夹中.在运行应用程序时,出现此错误

I'm trying to configure firebase for my flutter ios app, I have downloaded my GoogleService-Info.plist and added it to the Runner/Runner folder in Xcode. When running the app, I get this error

Configuring the default Firebase app...
    "signalStrengthChanged:info:",
    "cellChanged:cell:",
    "connectionStateChanged:connection:dataConnectionStatusInfo:",
    "carrierBundleChange:"
)
    "signalStrengthChanged:info:",
    "cellChanged:cell:",
    "connectionStateChanged:connection:dataConnectionStatusInfo:",
    "carrierBundleChange:"
)
    "signalStrengthChanged:info:",
    "cellChanged:cell:",
    "connectionStateChanged:connection:dataConnectionStatusInfo:",
    "carrierBundleChange:"
)
    "signalStrengthChanged:info:",
    "cellChanged:cell:",
    "connectionStateChanged:connection:dataConnectionStatusInfo:",
    "carrierBundleChange:"
)
Configured the default Firebase app __FIRAPP_DEFAULT.
Lost connection to device.
*** First throw call stack:
(
    0   CoreFoundation                      0x000000010d2161bb __exceptionPreprocess + 331
    1   libobjc.A.dylib                     0x000000010c7b4735 objc_exception_throw + 48
    2   CoreFoundation                      0x000000010d215d29 -[NSException raise] + 9
    3   Runner                              0x0000000104014564 GADApplicationVerifyPublisherInitializedAnalyticsCorrectly + 263
    4   Runner                              0x0000000103fc40f8 GADStatusBarOrientation + 3141
    5   libdispatch.dylib                   0x000000010e42c4e1 _di<…>
Exited (sigterm)

有什么主意我可能会缺少的东西吗?

Any Ideas what I might be missing?

推荐答案

此问题很可能是由于缺少Info.plist中的内容(对我而言).

This issue is most likely due to missing content in the Info.plist, as it was for me.

将以下内容添加到Info.plist

Add the following to Info.plist

<key>GADApplicationIdentifier</key>
<string>ca-app-pub-3940256099942544~1458002511</string>

请确保将 ca-app-pub-3940256099942544〜1458002511 替换为您的AdMob ID.

Be sure to replace ca-app-pub-3940256099942544~1458002511 with your AdMob ID.

请参见 https://firebase.google.com/docs/admob/ios/quick-start

这篇关于Firebase设置后,Flutter ios应用程序崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆