Skip to content

No Simulator Available bug after updating to XCode 14 #1702

Description

@swrobel

Environment

$ yarn react-native info
info Fetching system and libraries information...
System:
OS: macOS 12.6
CPU: (10) arm64 Apple M1 Max
Memory: 1.16 GB / 64.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.17.0 - /var/folders/j1/rbgfh8_941j0_nq_tlktst3c0000gn/T/yarn--1663808231939-0.5003892415162974/node
Yarn: 1.22.19 - /var/folders/j1/rbgfh8_941j0_nq_tlktst3c0000gn/T/yarn--1663808231939-0.5003892415162974/yarn
npm: 8.15.0 - /opt/homebrew/bin/npm
Watchman: 2022.09.19.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.11.3 - bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.4, iOS 16.0, macOS 12.3, tvOS 16.0, watchOS 9.0
Android SDK: Not Found
IDEs:
Android Studio: 2021.2 AI-212.5712.43.2112.8609683
Xcode: 14.0/14A309 - /usr/bin/xcodebuild
Languages:
Java: 11.0.16.1 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 18.1 => 18.1.0
react-native: ^0.70.0 => 0.70.1
react-native-macos: Not Found
npmGlobalPackages:
*react-native*: Not Found
✨ Done in 1.30s.

I'm not sure why it's saying @react-native-community/cli: Not Found:

$ cat node_modules/@react-native-community/cli/package.json
{
"name": "@react-native-community/cli",
"version": "9.1.1",
...

Description

After updating to XCode 14, I can't run my application without manually specifying a simulator.

$ yarn ios
yarn run v1.22.19
$ react-native run-ios
warn Multiple Podfiles were found: ios/Podfile,vendor/bundle/ruby/2.7.0/gems/cocoapods-core-1.11.3/lib/cocoapods-core/Podfile. Choosing ios/Podfile automatically. If you would like to select a different one, you can configure it via "project.ios.sourceDir". You can learn more about it here: https://github.com/react-native-community/cli/blob/master/docs/configuration.md
info Found Xcode workspace "SimulatorTest.xcworkspace"
error No simulator available with name "iPhone 13".
info Run CLI with --verbose flag for more details.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

All instances of "iPhone 13" in xcrun simctl list --json devices have "isAvailable" : false (gist), so I'm not sure why it's trying to run that simulator.

Reproducible Demo

$ npx react-native@0.70.1 init SimulatorTest
...
$ cd SimulatorTest
$ yarn ios
$ yarn ios
yarn run v1.22.19
$ react-native run-ios
warn Multiple Podfiles were found: ios/Podfile,vendor/bundle/ruby/2.7.0/gems/cocoapods-core-1.11.3/lib/cocoapods-core/Podfile. Choosing ios/Podfile automatically. If you would like to select a different one, you can configure it via "project.ios.sourceDir". You can learn more about it here: https://github.com/react-native-community/cli/blob/master/docs/configuration.md
info Found Xcode workspace "SimulatorTest.xcworkspace"
error No simulator available with name "iPhone 13".
info Run CLI with --verbose flag for more details.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions