react-native run-ios can not find any simulator
Problem
Environment React Native Environment Info: System: OS: macOS 10.14.2 CPU: (12) x64 Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz Memory: 6.76 GB / 32.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 10.15.0 - /usr/local/bin/node Yarn: 1.13.0 - /usr/local/bin/yarn npm: 6.4.1 - /usr/local/bin/npm SDKs: iOS SDK: Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1 IDEs: Android Studio: 3.1 AI-173.4819257 Xcode: 10.1/10B61 - /usr/bin/xcodebuild npmPackages: react: 16.6.3 => 16.6.3 react-native: 0.57.8 => 0.57.8 npmGlobalPackages: create-react-native-app: 1.0.0 react-native-cli: 2.0.1 react-native-git-upgrade: 0.2.7 Description I have been facing an issue where 'react-native run-ios' can not start, regardless of the simulator I add to the --simulator argument. XCode has the correct location for the 'command line tools' I am always getting the error: Could not find iPhone X simulator Error: Could not find iPhone X simulator at resolve (/Users/eric/.../swim/node_modules/react-native/local-cli/runIOS/runIOS.js:149:13) at new Promise (<anonymous>) at runOnSimulator (/Users/eric/.../swim/node_modules/react-native/local-cli/runIOS/runIOS.js:134:10) at Object.runIOS [as func] (/Users/eric/.../swim/node_modules/react-native/local-cli/runIOS/runIOS.js:106:12) at Promise.resolve.then (/Users/eric/.../swim/node_modules/r
Error Output
error: Could not find iPhone X simulator
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Solution: react-native run-ios can not find any simulator
I have the same issue here as well. When I changed to if (!version.includes('iOS') && !version.includes('tvOS')) { continue; } all is well, since the prefix "com.apple.CoreSimulator.SimRuntime." is included in the device-list, the pure check for startsWith fails for all simulators.
Trust Score
7 verifications
- 1
I have the same issue here as well.
When I changed to if (!version.includes('iOS') && !version.includes('tvOS')) { continue; }
- 2
all is well, since the prefix "com.apple.CoreSimulator.SimRuntime." is included
all is well, since the prefix "com.apple.CoreSimulator.SimRuntime." is included in the device-list, the pure check for startsWith fails for all simulators.
Validation
Resolved in facebook/react-native GitHub issue #23282. Community reactions: 42 upvotes.
Verification Summary
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep