I’m developing a Flutter app, and it installs and runs perfectly fine when I deploy it to my mobile device directly from my development environment (like VS Code or Android Studio). However, once I stop the app and try to launch it again by tapping its icon on the home screen, the app fails to start.
What could be causing this issue, and how can I troubleshoot or resolve it?
2
Answers
This is due to
Apple Privacythe way Flutter IDE works. App can not be run after you disconnect it from debugging mode . How ever you can deploy it to Test Flight and then can run it without debugging by installing it from test flight.Are you running your app on a real device or simulator?
If it is a real device, yes, you can’t launch the app like that because the app stops connecting (when you stop the app) to Dart VM service like the image attached below
More info here
Just try to run on release mode
flutter run --release
if you would like to do thatIt is fine when run on a simulator