I have developed a Flutter app. It works fine on the simulator. When I try to launch it on a physical device (iPhone 14), the app starts and works fine. But, when I unplug the iPhone and try to restart the app, it immediately crashes.
When I launch the app in the simulator, I don't have any warning but when I launch it to the device I have the following:
Runner[2706:915965] 10.7.0 - [FirebaseCore][I-COR000005] No app has been configured yet.
[TraitCollection] Class CKBrowserSwitcherViewController overrides the -traitCollection getter, which is not supported. If you're trying to override traits, you must use the appropriate API.
Regarding the Firebase one, it is strange because it is initialized in the main.dart, after having initialized
WidgetsFlutterBinding.ensureInitialized();
I also deleted the GoogleService-Info.plist file and added it directly via Xcode but it didn't make the message disappear.
I changed the Scheme in Xcode to Release instead of Debug as read in an answer to a similar question but it didn't solve the problem.
My Xcode version is the latest one (14.3.1) and Flutter doctor gives
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.7.11, on macOS 13.4.1 22F82 darwin-arm64, locale fr-BE)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 14.3.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.2)
[✓] Connected device (4 available)
! Error: Apple Watch de Bernard needs to connect to determine its availability. Check the connection between the device and its companion iPhone, and the connection between
the iPhone and Xcode. Both devices may also need to be restarted and unlocked. (code 1)
[✓] HTTP Host Availability
• No issues found!
I don't know what to do.
Thanks for your help!