Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter can't connect to iOS simulator

Tags:

flutter

dart

I created first flutter app on Mac.

but I can't build it on iOS simulator. when I build it; an iOS simulator will run. and wait.

vs Code say to me;

-Cannot launch without an active device

-Failed to launch iOS Simulator: Error: Emulator didn't connect within 60 seconds

IDE : vs Code

my Macbook : MacBook Pro 2011 early

macOs version : high Sierra

flutter version : 13.8

xcode version : 9.4

like image 984
onrcn_ Avatar asked Jan 12 '20 11:01

onrcn_


People also ask

How do I connect my iOS device to Flutter?

You need to go to your Settings > General > Device Management. Inside Device Management, select the developer name and tap Trust “YOUR DEVELOPER NAME”. You should now be able to run your Flutter app on your local device.

How do you run the Flutter app on simulation?

Choose Device: Open your VS Code and from the bottom right corner of your home screen click on the Flutter Device option. Select Device: When you click on the Flutter Device icon, list of available devices will open up in the command palette. Select the emulator you just created.


3 Answers

Open Xcode and go to preferences - > locations - > Command Line Tools and select Xcode 10 or above

like image 171
Yavuz Tarhan Avatar answered Oct 21 '22 22:10

Yavuz Tarhan


Which device do you use as a Simulator? From the docs:

Make sure your simulator is using a 64-bit device (iPhone 5s or later) by checking the settings in the simulator’s Hardware > Device menu.

Run flutter doctor. Are there any errors?

like image 2
Bassam Avatar answered Oct 21 '22 23:10

Bassam


I have the same problem. Flutter doesn't see any simulators. Flutter required now Xcode 10.2 minimum. You can't run 10.2 on high sierra, therefore use flatter.

like image 2
Dmitry Sokolov Avatar answered Oct 21 '22 22:10

Dmitry Sokolov