7

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?

Cipher
  • 391
  • 1
  • 4
  • 11

5 Answers5

14

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.

Saqlain
  • 191
  • 1
  • 8
0

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.

Ash Khachatryan
  • 427
  • 1
  • 5
  • 18
0

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.

0

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
Suat Özkaya
  • 427
  • 3
  • 9
0

Its not possible for now, you should build app only on Release mode (from XCode) to make it run on Physical phone.

isarojdahal
  • 994
  • 8
  • 12