20

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.

1

2 Answers 2

41
  1. First ensure flutter doctor runs good and all necessary iOS components are installed.
  2. Then manually opened the Simulator app in the Mac.
  3. Then ensure the simulator shows up in flutter devices.
  4. Now if you run the flutter run command, it built the app for iOS and ran on the iOS Simulator.
Sign up to request clarification or add additional context in comments.

3 Comments

"Then ensure the simulator shows up in flutter devices.". This step seems particularly problematic :/
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.
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
1

run flutter doctor, you may found a problem relating to Xcode, type the two commands provided to fix the problem and will appear.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.