Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

flutter iOS has white screen

Tags:

ios

flutter

dart

I run my app on the simulator and keep getting a white screen. While the same works on an android simulator.

I'm not able to find a reason in the logs.

user:$ flutter run

Launching lib/main.dart on iPhone XR in debug mode...
Running Xcode build...                                                  

 ├─Assembling Flutter resources...                          16.6s
 └─Compiling, linking and signing...                        12.6s
Xcode build done.                                           39.8s
        path: satisfied (Path is satisfied), interface: en0
Failed to find assets path for "Frameworks/App.framework/flutter_assets"
Configuring the default Firebase app...
6.17.0 - [Firebase/Core][I-COR000004] App with name __FIRAPP_DEFAULT does not exist.
        path: satisfied (Path is satisfied), interface: en0
[Crashlytics] Version 3.14.0 (144)
Configured the default Firebase app __FIRAPP_DEFAULT.
[Fabric] [Fabric +with] called multiple times. Only the first call is honored, please pass all kits you wish to initialize
[VERBOSE-2:engine.cc(127)] Engine run configuration was invalid.
[VERBOSE-2:shell.cc(437)] Could not launch engine with configuration.
        [C1.1 A86E5A82-4A2C-48C3-A211-EC9399A18596 192.168.2.103:61370<->216.58.207.67:443]
        Connected Path: satisfied (Path is satisfied), interface: en0   
        Duration: 0.522s, DNS @0.006s took 0.060s, TCP @0.068s took 0.032s, TLS took 0.162s
        bytes in/out: 6279/1424, packets in/out: 10/9, rtt: 0.032s, retransmitted packets: 0, out-of-order packets: 0
6.17.0 - [Firebase/Analytics][I-ACS023007] Analytics v.60202000 started 
6.17.0 - [Firebase/Analytics][I-ACS023008] To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled (see xx://xx.xx/xx)
6.17.0 - [Firebase/Analytics][I-ACS031025] Analytics screen reporting is enabled. Call +[FIRAnalytics setScreenName:setScreenClass:] to set the screen name or override the default screen class name. To disable screen reporting, set the flag FirebaseScreenReportingEnabled to NO (boolean) in the Info.plist
6.17.0 - [Firebase/Analytics][I-ACS023012] Analytics collection enabled 
Syncing files to device iPhone XR...                                    
 9,472ms (!)                                       

enter image description here

like image 773
ir2pid Avatar asked Apr 07 '20 09:04

ir2pid


People also ask

How do I get rid of the white screen on Flutter app?

On the right in the properties, there is the background attribute. Clicking on this and choosing custom will allow you to define the RGB value you'd like the colour of the white screen to now appear as. Running your app on Android and iOS will now no longer show the annoying white screen.

Do you need a Mac for Flutter iOS?

With Flutter and Codemagic, you can build and distribute iOS apps without buying a Mac computer yourself. In this post, we will walk you through how you can create a Flutter app on Linux or Windows and use Codemagic CI/CD to set up code signing for your iOS project and release the application to the App Store.

How do I run a Flutter on iOS?

To test or deploy our flutter app to a physical device we first need to enable physical device deployment in Xcode using Apple ID or an Apple Developer account. And we also need to set up a package manager to manage flutter plugins that are to be used in the project.

Does Flutter works on iOS?

Flutter supports iOS 9.0 and later. If your app or plugins include Objective-C or Swift code that makes use of APIs newer than iOS 9, update this setting to the highest required version.


2 Answers

as suggested by @pskink using --enable-software-rendering works.

flutter run --enable-software-rendering

like image 91
ir2pid Avatar answered Nov 14 '22 10:11

ir2pid


1- rm -rf ios/Flutter/App.framework

2- Change the Runner target build settings Build Phases > Thin Binary script as follows:

/bin/sh "$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh" embed
/bin/sh "$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh" thin
like image 24
Ahmed Abu Eldahab Avatar answered Nov 14 '22 08:11

Ahmed Abu Eldahab