skip to Main Content

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


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

    Login or Signup to reply.
  2. 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.

    Login or Signup to reply.
  3. 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.

    Login or Signup to reply.
  4. 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
    Login or Signup to reply.
  5. Its not possible for now, you should build app only on Release mode (from XCode) to make it run on Physical phone.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search