I made a flutter app and tried to build on iPhone. It works while debugging is connected. But if I try to exit and relaunch the app or disconnect cable, it would not launch again and keeps crashing. How can I use the app while Xcode debugging is disconnected?
5 Answers
Run flutter run --release
in the terminal and that'll allow you to run a production version app on your iOS device without debugging connected.

- 191
- 1
- 8
If you only Start Debugging
after this you can disconnect cable and will work. If you after Restart Debugging
after this if you disconnect cable app will be crashing. I think you restart debugging.

- 427
- 1
- 5
- 18
From Xcode, you can change the Build Configuration of the Run Schema easily. To do this, click on Runner -> Edit Scheme, then go in the Run tab, choose "Release" in the Build Configuration drop down menu. To install the application, run the configuration again.
See Step 4 in this page for screenshots.
Assuming you can already able to debug with cable.
flutter build ios
- connect cable
flutter install
, if more than 1 device option is available, terminal will prompt you to choose the device for installation.- now you can disconnect cable

- 427
- 3
- 9
-
theres no need for a provisioning profile for this? – chitgoks Feb 06 '23 at 14:48
Its not possible for now, you should build app only on Release mode (from XCode) to make it run on Physical phone.

- 994
- 8
- 12