'Can't run Flutter app on iOS without usb-cable connected
I have a Flutter project which shows a map with a user's location.
This app runs fine on physical Android and iOS devices when connected via USB.
Without having the USB cable connected on iOS, the app crashes immediately when started. On Android this not an issue.
Other apps I've made in Ionic/Angular did not have this problem. Could it be that there is some debugger in XCode to which my app tries to connect? Or maybe another setting I've missed?
Solution 1:[1]
This is a known issue. The Flutter iOS app when run in debug mode won't be able to run on a physical device when disconnected to the host machine due to changes in debugger mechanisms since iOS 14.
Solution 2:[2]
It turned out that I could use the Flutter app without my usb cable connected. First I had to run the app on my iPhone via XCode. Then I only had to deploy the app to my iPhone with
flutter run --release.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Omatt |
| Solution 2 | Bas van Dijk |
