简体   繁体   English

iOS Flutter 与 Firebase:启动时 FlutterAppDelegate 中的白屏和 SIGABRT

[英]iOS Flutter with Firebase : white screen and SIGABRT in FlutterAppDelegate on launch

In more than one project now, and very inconsistently, I get a white screen upon launching my app, and Xcode showing an error, Thread 1: signal SIGABRT , on the line @objc class AppDelegate: FlutterAppDelegate .现在在不止一个项目中,而且非常不一致的是,我在启动我的应用程序时得到一个白屏,并且 Xcode 显示错误, Thread 1: signal SIGABRT ,在行@objc class AppDelegate: FlutterAppDelegate

These are iOS Flutter projects that make use of Firebase .这些是使用 Firebase 的iOS Flutter项目。

I'm looking for some solid universal fixes for this, because it appears to happen intermittently and takes a long time for me to resolve, which is usually after trying so many things that I dont' know what fixed it.我正在为此寻找一些可靠的通用修复程序,因为它似乎间歇性地发生并且我需要很长时间才能解决,这通常是在尝试了很多我不知道修复它的事情之后。

I'm going to be systematic about when it happens now, and when it doesn't, so I can make this question clear and useful.我将系统地了解它什么时候发生,什么时候不发生,所以我可以让这个问题变得清晰和有用。
My Xcode is currently version 11.0.0.我的 Xcode 当前版本为 11.0.0。
I have a Deployment Target of iOS 8.0.我有一个 iOS 8.0 的部署目标。

  • The crash happens when I run the app from the VS code debugger or from Xcode onto an iPad running iOS 9.3.5当我从 VS 代码调试器或从 Xcode 到运行 iOS 9.3.5 的 iPad 上运行应用程序时发生崩溃
  • It doesn't crash when I run it from Xcode to an iPhone 6 simulator, or to an iPhone Xs simulator当我将它从 Xcode 运行到 iPhone 6 模拟器或 iPhone Xs 模拟器时,它不会崩溃

OK - so - while putting the question together I (1) tried the app on the iPad device and it crashed, (2) tried the app on some simulators and it worked, then (3) retried the app on my iPad and it worked.好的 - 所以 - 在把问题放在一起时,我 (1) 在 iPad 设备上尝试了该应用程序并且它崩溃了,(2) 在一些模拟器上尝试了该应用程序并且它有效,然后 (3) 在我的 iPad 上重试了该应用程序并且它有效.

So a solution that works to fix this issue sometimes is to, from within Xcode:因此,有时可以解决此问题的解决方案是从 Xcode 内部:

Run the app on a simulator, then re-run it on your device在模拟器上运行应用程序,然后在您的设备上重新运行它

在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM