How to use iOS debug app on iPhone while disconnected?

Viewed 1535

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?

4 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.

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.

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
Related