29

Today I have started learning Flutter. I am using Android Studio in Mac. I have already

  • Configured the Flutter and Dart plugins in Android studio.
  • Installed the Flutter SDK.

So I am able to run Flutter app in Android Emulator. However, when I select iOS simulator (Open iOS Simulator), it says this

Unable to find application named 'Simulator.app

enter image description here I do not have any experience is XCode and I have not installed it in my Mac.

My questions are,

  1. How do I install the Simulator?
  2. Do I need the Xcode installed in Mac for running Simulator? (Does Simulator come with Xcode)
  3. My understanding was that installing the Flutter plugin in Android Studio will import iOS simulator as well. Am I wrong?

I found similar question but did not get the clarity.

5
  • 1
    run flutter doctor , check connected simulator. Commented Apr 18, 2019 at 12:12
  • Do we install a simulator in Mac ? How Commented Apr 18, 2019 at 12:14
  • did you install xCode ? if not, then need to install xCode from app store Commented Apr 18, 2019 at 12:15
  • No. Does simulator come with xcode? + And will Android automatically detect it? Commented Apr 18, 2019 at 12:16
  • Yes simulators come with xCode. Please follow flutter.dev/docs/get-started/install/macos iOS setup Commented Apr 18, 2019 at 12:18

9 Answers 9

47

You can also configure the Command Line Tools from Xcode, by opening Preferences > Locations and selecting it from dropdown.

After selecting Xcode version you can find iOS Simulator name in your Android Studio for flutter project.

enter image description here

Sign up to request clarification or add additional context in comments.

3 Comments

This solution worked really fine. Just a simple step. But 100% accurate. Thanks.
Its Really a Perfect solution, Thanks for sharing ...
It shows only available xcode version, unable to select Xcode 9.0?
16

If you have fluttered, just execute the command: open -a Simulator.

Comments

8

If iOS device not showing in an android studio then first open up simulator app in mac.

Open simulator app

enter image description here

after simulator is loaded, go to Hardware -> Device -> Manage Device and uncheck the physical device and go to simulator tab and choose the required simulator and check it 'Show as run destination' and reload android studio.

It will start showing in android studio and now you can run your flutter app in both android and iOS.

Manage Device

enter image description here

1 Comment

I dont see the simulator app on my mac. Is it not built into the xcode?
3

If you don't need IDE debugger support, you can skip the overhead of launching it through the IDE, and instead simply launch the Flutter app from the command line.

Once Simulator is running, run these 2 commands:

  1. flutter doctor - to verify the simulator is recognized by Flutter and no other emulators are running
  • You should see this in the output:      [✓] Connected device (1 available)
  1. flutter run - will deploy the app to the know emulator or simulator

Thanks to: https://flutter.dev/docs/get-started/install/macos#create-and-run-a-simple-flutter-app

1 Comment

Nice, thanks. I ran "flutter doctor" and then it told me to run "sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer" and "sudo xcodebuild -runFirstLaunch" and now the iOS Simulator appears in Android Studio in the device dropdown.
3

After a fresh install of Flutter and Xcode, I had to restart my Mac in order to Flutter recognize the iOS Simulator. Probably something with config of older installations.

Comments

2

In my case , I just need to launch one of ios simulators from XCode , and then my Android Studio can see the ios simulator.

Comments

1

To install the simulator you have to install Xcode, simulator is not distributed as a standalone app. Once you have installed it follow this guide.

I was thinking that installing Flutter and Dart plugins will link IOS simulator in Android Studio as well.

Yes once installed you can start the iOS simulator from Android Studio and run your flutter app from it but the simulator is only linked, you have to install it yourself.

Comments

1

For me, this error appeared after an update of Xcode. Starting Xcode fixed the issue. Xcode asked for "Install additional required components?" and after this finished, Android Studio recognized iOS simulator.

Comments

0

Basically, it needs to install brew package manager and some other dependencies. I got my problem solve by the following flutter doc page.

enter image description here

source: https://flutter.dev/docs/get-started/install/macos#update-your-path

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.