Using iOS simulator in Android Studio is straightforward –
- Install X-Code (with Simulator)
- Make sure you run the command
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer - Make sure you run the command
sudo xcodebuild -license - Open Simulator
- Open Android Studio
- Should see the ios simulator in the dropdown box
However, I hit a weird situation where the iOS simulator can start successfully but the option can’t be shown in the dropdown box in Android Studio.
Checkpoint #1
The Command Line Tools in XCode preference has been set correctly.
Open your XCode and go to Preference -> Locations. Inside this tab, under locations, you will see one option of Command line tools. If nothing is selected here, click on it and select the installed command line tools.
Checkpoint #2
Recheck the xcode path has been set correctly. xcode-select -p
Checkpoint #3
Check Xcode version
The reason I put it last is that *ideally* you should have a correct version of Xcode when you install it.
However, sometimes the version of Android Studio requires a different version of Xcode than you have. It happens when your software is up-to-date but your OS is NOT up-to-date.
In my case, I recognize it by running flutter doctor, and even flutter is complaining about a newer version of Xcode.
