首页 > 解决方案 > Flutter ios 卡在“配置默认 Firebase 应用”

问题描述

我现在不想要推送通知,尽管我已经GoogleService-Info.plist为 firebase 推送通知添加了文件和代码。

它适用于android,但在iOS中存在问题。iOS 就这样卡住了。

在此处输入图像描述

标签: flutter

解决方案


答案应该在此处作为报价提供:

  1. 打开 Xcode,然后右键单击Runner目录并选择Add Files to "Runner"。
  2. 从文件管理器中选择GoogleService-Info.plist 。
  3. 将出现一个对话框并要求您选择目标,选择Runner目标。
  4. 然后将下面的CFBundleURLTypes属性添加到[my_project]/ios/Runner/Info.plist文件中。
<!-- Put me in the [my_project]/ios/Runner/Info.plist file -->
<!-- Google Sign-in Section -->
<key>CFBundleURLTypes</key>
<array>
    <dict>
        <key>CFBundleTypeRole</key>
        <string>Editor</string>
        <key>CFBundleURLSchemes</key>
        <array>
            <!-- TODO Replace this value: -->
            <!-- Copied from GoogleService-Info.plist key REVERSED_CLIENT_ID -->
            <string>com.googleusercontent.apps.861823949799-vc35cprkp249096uujjn0vvnmcvjppkn</string>
        </array>
    </dict>
</array>
<!-- End of the Google Sign-in Section -->

推荐阅读