Programming/React Native

React Native - Could not find iPhone X simulator

c29130811 2019. 4. 2. 17:57

▶ react-native run-ios
yarn run v1.13.0
Found Xcode workspace projectS.xcworkspace

Could not find iPhone X simulator

Error: Could not find iPhone X simulator
    at resolve (/Users/choi/projectS/radish-client/node_modules/react-native/local-cli/runIOS/runIOS.js:149:13)
    at new Promise ()
    at runOnSimulator (/Users/choi/projectS/node_modules/react-native/local-cli/runIOS/runIOS.js:134:10)
    at Object.runIOS [as func] (/Users/choi/projectS/node_modules/react-native/local-cli/runIOS/runIOS.js:106:12)
    at Promise.resolve.then (/Users/choi/projectS/node_modules/react-native/local-cli/cliEntry.js:117:22)

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

 

에러 발생 시,  /node_modules/react-native/local-cli/runIOS/findMatchingSimulator.js

 

before

// Making sure the version of the simulator is an iOS or tvOS (Removes Apple Watch, etc) if (!version.startsWith('iOS') && !version.startsWith('tvOS')) { continue; }

 

after

// Making sure the version of the simulator is an iOS or tvOS (Removes Apple Watch, etc) /* if (!version.startsWith('iOS') && !version.startsWith('tvOS')) { continue; }*/ if (!version.startsWith('com.apple.CoreSimulator.SimRuntime.iOS') && !version.startsWith('com.apple.CoreSimulator.SimRuntime.tvOS')) { continue; }

 

수정

728x90