Flutter iOS应用程序在启动时显示白色并在该屏幕上挂断

6ojccjat  于 2023-08-07  发布在  Flutter
关注(0)|答案(7)|浏览(182)

我有一个flutter应用程序使用了firebase认证库。当我启动它的iOS版本,它向我显示了一个空白的白色屏幕,并挂在该屏幕上.我遵循了所有的步骤,将一些firebase相关的标志添加到Info.plist中,如FirebaseScreenRecordingEnabled - NO,FirebaseScreenRecordingDeactiv - YES和一两个。我已经尝试清理构建文件夹和flutter缓存。我也试过下面的答案:iOS Flutter with Firebase : white screen and SIGABRT in FlutterAppDelegate on launch

~/Documents/Work/Workspaces/flutter/myapp $ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, v1.10.7-pre.80, on Mac OS X 10.15.2 19C57, locale en-IN)

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 11.2)
[✓] Android Studio (version 3.5)
[!] VS Code (version 1.41.1)
    ✗ Flutter extension not installed; install from
      https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
[!] Connected device
    ! No devices available

! Doctor found issues in 2 categories.

字符串
顺便说一句,我正在使用Android Studio的Flutter应用程序。
以下是xCode logger的日志:

2020-01-09 21:29:10.811285+0530 my-app[4621:1081677] Failed to find snapshot: /var/containers/Bundle/Application/57CC0DF5-D142-4748-A3D3-66E62A9F1A53/my-app.app/Frameworks/App.framework/flutter_assets/kernel_blob.bin
2020-01-09 21:29:11.365554+0530 my-app[4621:1081942] flutter: Observatory listening on http://127.0.0.1:57358/yuCVtFtKdlI=/
2020-01-09 21:29:11.426615+0530 my-app[4621:1081677] Configuring the default Firebase app...
2020-01-09 21:29:11.427922+0530 my-app[4621:1081920] 6.14.0 - [Firebase/Core][I-COR000004] App with name __FIRAPP_DEFAULT does not exist.
2020-01-09 21:29:11.429326+0530 my-app[4621:1081920] 6.14.0 - [Firebase/Core][I-COR000008] The project's Bundle ID is inconsistent with either the Bundle ID in 'GoogleService-Info.plist', or the Bundle ID in the options if you are using a customized options. To ensure that everything can be configured correctly, you may need to make the Bundle IDs consistent. To continue with this plist file, you may change your app's bundle identifier to 'dev.bipin.myapp'. Or you can download a new configuration file that matches your bundle identifier from https://console.firebase.google.com/ and replace the current one.
2020-01-09 21:29:11.547978+0530 my-app[4621:1081677] Configured the default Firebase app __FIRAPP_DEFAULT.
2020-01-09 21:29:11.614019+0530 my-app[4621:1081932] [VERBOSE-2:engine.cc(127)] Engine run configuration was invalid.
2020-01-09 21:29:11.614685+0530 my-app[4621:1081932] [VERBOSE-2:shell.cc(443)] Could not launch engine with configuration.
2020-01-09 21:29:11.696741+0530 my-app[4621:1081928] 6.14.0 - [Firebase/Analytics][I-ACS023007] Analytics v.60107000 started
2020-01-09 21:29:11.697266+0530 my-app[4621:1081928] 6.14.0 - [Firebase/Analytics][I-ACS023008] To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled
2020-01-09 21:29:13.657220+0530 my-app[4621:1081923] [MC] System group container for systemgroup.com.apple.configurationprofiles path is /private/var/containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles
2020-01-09 21:29:13.662995+0530 my-app[4621:1081923] [MC] Reading from public effective user settings.
2020-01-09 21:29:34.648535+0530 my-app[4621:1082005] [BoringSSL] nw_protocol_boringssl_get_output_frames(1301) [C1.1:2][0x14de28120] get output frames failed, state 8196
2020-01-09 21:29:34.649072+0530 my-app[4621:1082005] [BoringSSL] nw_protocol_boringssl_get_output_frames(1301) [C1.1:2][0x14de28120] get output frames failed, state 8196
2020-01-09 21:29:34.650329+0530 my-app[4621:1082005] TIC Read Status [1:0x0]: 1:57
2020-01-09 21:29:34.650477+0530 my-app[4621:1082005] TIC Read Status [1:0x0]: 1:57
2020-01-09 21:29:42.223040+0530 my-app[4621:1082027] [BoringSSL] nw_protocol_boringssl_get_output_frames(1301) [C2.1:2][0x14dd3cee0] get output frames failed, state 8196
2020-01-09 21:29:42.224070+0530 my-app[4621:1082027] [BoringSSL] nw_protocol_boringssl_get_output_frames(1301) [C2.1:2][0x14dd3cee0] get output frames failed, state 8196
2020-01-09 21:29:42.225360+0530 my-app[4621:1082027] TIC Read Status [2:0x0]: 1:57
2020-01-09 21:29:42.225503+0530 my-app[4621:1082027] TIC Read Status [2:0x0]: 1:57


但目前还没找到。有谁能帮我一下。谢啦,谢啦

zrfyljdw

zrfyljdw1#

错误日志明确指出
项目的Bundle ID与'GoogleService-Info. plist'中的Bundle ID不一致,如果您使用的是自定义选项,则与选项中的Bundle ID不一致。为了确保一切都可以正确配置,您可能需要使Bundle ID保持一致。要继续使用此plist文件,您可以将应用的捆绑包标识符更改为'com.tethys. client'。或者您可以从https://console.firebase.google.com/下载一个与您的包标识符匹配的新配置文件并替换当前的配置文件。
尝试从iOS项目替换GoogleService-Info.plist。确保它具有有效的捆绑包ID
另外,在创建归档文件或分发归档文件之前,请确保您是否正在运行以下命令。
flutter build ios --release
或者是
flutter build ios
flutter build默认为--release

f4t66c6m

f4t66c6m2#

哦,我终于发现这个东西Flutter框架的问题与iOS 14及更高版本的设备,请检查更多细节在这里:https://github.com/flutter/flutter/issues/60657#issuecomment-688478590

kg7wmglp

kg7wmglp3#

截至2021年4月28日,对我有效的是(经过几天的斗争):
在AppDelegate.swift(flutter-project/ios/Runner)中:添加这两行:

FirebaseApp.configure()
GeneratedPluginRegistrant.register(with: self)

字符串
在终端:
Flutter Build iOS
然后在XCode中运行项目

mfpqipee

mfpqipee4#

可能是package_info_plus plugin,在runApp(App());之前调用PackageInfo packageinfo = await PackageInfo.from Platform();方法时会出现白色

5tmbdcev

5tmbdcev5#

Flutter 清洗
Flutter建立-释放
然后是XCode/Archive

2lpgd968

2lpgd9686#

我遇到过这个问题。
我的方法是:
在pubspec.yaml文件中运行软件包升级
希望能对您有所帮助。

0sgqnhkj

0sgqnhkj7#

我有同样的问题,它是停留在蓝屏,这是通过在项目中添加GoogleService-info.plist修复。它可以添加到Xcode或iOS文件夹中。
请检查日志,如果它试图连接到firebase或有任何firebase依赖。如果是这样,那么检查您是否添加了GoogleService-info. plist。你可能错过了。
在做了清洁,构建文件夹和运行.希望它能正常工作。

相关问题