Home > Back-end >  How to Hot Reload flutter when running from xcode
How to Hot Reload flutter when running from xcode

Time:10-21

I'm trying to do Hot Reload when running flutter code from xcode but nothing I seem to do works.

I see a console within xcode. I can see my logs there but I don't see the normal "Flutter run commands" output. When I type "r" or "R" there it just writes "r" or "R" with no change to my running app.

I have tried running flutter run from the terminal and I also can't type "r" or "R" without it only typing that letter into the console.

I can do do hot reload via VSCode but I'm running into this issue (I can temporarily fix this issue but it comes up every other build).

CodePudding user response:

The Xcode console doesn't work the way you're trying to do so. Here are a few commands to Clean, Build and Run Xcode Project. Also there is no hot reload in Xcode. You can simply use these commands anywhere in Xcode except Console.

Shift   CMD   K to clean.
CMD   B to build.
CMD   R to run.

CodePudding user response:

I was able to debug my flutter code that was ran from xcode by attaching a flutter debugger.

I had to use VScode to attach the debugger. I installed the flutter extension. Second, I searched for the commend Flutter: Attach to Flutter on Device. Once you have that running, there are options to click to hot reload or hot restart.

  • Related