Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter : Not Connecting to IOS Simulator in Android Studio

I am following the Flutter Test Drive tutorial on the Flutter Docs. I installed XCode, cocoapods, ran pods setup etc.

However, in Android Studio, when I try to run IOS by clicking "Run IOS Simulator," it opens the simulator but fails to connect.

I also tried doing this from the terminal. Opened an IOS emulator and then ran flutter run in the app folder in terminal. I got an error No devices attached.

like image 760
Android Ninja Avatar asked May 13 '18 16:05

Android Ninja


People also ask

Can I run iOS simulator on Android studio?

Issue of iOS Simulators not showing in Android Studio: In Android Studio, if you click on the devices tab, it will show you Chrome and Android emulators. There is not other options to add an iOS simulator.

How do I connect my iOS device to Flutter?

To test or deploy our flutter app to a physical device we first need to enable physical device deployment in Xcode using Apple ID or an Apple Developer account. And we also need to set up a package manager to manage flutter plugins that are to be used in the project.


2 Answers

Please check whether you installed the latest version of Xcode.

After the installation, try to run the following command.

sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer 
like image 121
MUHAMMED IQBAL PA Avatar answered Sep 16 '22 14:09

MUHAMMED IQBAL PA


As other people have suggested, it happens when you update XCode. So, run the command in terminal suggested by Muhammed

sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer 

Then, you probably have to run flutter clean. For it to run properly.

like image 30
Diego Ramírez Avatar answered Sep 17 '22 14:09

Diego Ramírez