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.
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.
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.
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
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With