'"npx react-native run-ios" is picking non existing simulator
As per https://reactnative.dev/docs/environment-setup, I'm trying to run sample project on iOS simulator
When I ran command npx react-native run-ios
getting error
info Found Xcode workspace "AwesomeProject.xcworkspace"
error No simulator available with name "iPhone 12".
From where does it picking iPhone 12
, I don't have that simulator in first place
Solution 1:[1]
Open Xcode and check which simulators are installed or list available simulators in terminal with xcrun simctl list devices
.
Then define a simulator you wanna use:
npx react-native run-ios —simulator="iPhone 13"
Solution 2:[2]
React Native will pick a particular device by default, depending on its version.
As of version 0.67.2
, for example, it'll try to boot an iPhone 13 by default regardless of it existing or locally or not.
Solution 3:[3]
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Michael Bahl |
Solution 2 | André Herculano |
Solution 3 | Nguy?n Th? Thúy |