flutter run command does not launch in iOS Simulator. It launches good on Android simulator though. Using Mac. It seems to build the app only for Android.
-
1please check stackoverflow.com/a/54671608/4479395. it worked for me.MUHAMMED IQBAL PA– MUHAMMED IQBAL PA2019-02-13 14:01:35 +00:00Commented Feb 13, 2019 at 14:01
Add a comment
|
2 Answers
- First ensure
flutter doctorruns good and all necessary iOS components are installed. - Then manually opened the Simulator app in the Mac.
- Then ensure the simulator shows up in
flutter devices. - Now if you run the
flutter runcommand, it built the app for iOS and ran on the iOS Simulator.
3 Comments
theLastNightTrain
"Then ensure the simulator shows up in flutter devices.". This step seems particularly problematic :/
Scribblemacher
I had Xcode installed and was running the Simulator, but
flutter run didn't seem to see it. Running flutter doctor showed there were some commands that needed to be run after installed Xcode. Doing that fixed the problem for me.Brad Parks
NOTE: You can use flutter run -d PREFIX_OF_DEVICE_NAME to start it on a specific device. So for iPhone on ios simulator, have the simulator running, then run flutter run -d iPhone - which you will see is the FIRST part of the name of the device when you run
flutter devices. And you can only launch the ios flutter project if the simulator is ALREADY running, which you can launch from the command line on mac, by running open -a Simulator