【问题标题】:App closes on startup on Flutter (iOS) with Firebase with out giving any error应用程序在使用 Firebase 的 Flutter (iOS) 上启动时关闭,没有给出任何错误
【发布时间】:2021-07-20 18:31:02
【问题描述】:

该应用程序在 android 上运行良好,但是,当我在 iOS 上打开该应用程序时,它立即崩溃而没有任何错误。

【问题讨论】:

    标签: flutter dart flutter-ios flutter-ios-build


    【解决方案1】:

    我只是通过移动函数顶部的行来解决这个问题。

    FirebaseApp.configure()
    

    将上述行作为第一条指令放在 didFinishLaunchingWithOptions 方法中。如下所示。

    override func application(
        _ application: UIApplication,
        didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
      ) -> Bool {
        FirebaseApp.configure()
        GeneratedPluginRegistrant.register(with: self)
        return super.application(application, didFinishLaunchingWithOptions: launchOptions)
      }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-08-02
      • 1970-01-01
      • 2021-05-21
      • 1970-01-01
      • 2021-01-10
      • 2020-12-06
      • 2020-06-06
      • 2020-11-22
      相关资源
      最近更新 更多