Reputation: 157
I'm making a react-native app and have a problem. When I run the command: react-native run-ios, the build succeeds, and simulator starts, but the app won't start and my console does not build js bundle.
but when I build the sourc /ios/[projectName].xcodeproj from XCode, It works fine.
Can anyone help figure out why and how to fix this?
Upvotes: 4
Views: 4050
Reputation: 305
In my case, making sure I didn't have any simulators with the same name helped.
I recently updated to Xcode 10.2 and have simulators for iOS 12.1 and 12.2 but they have the same name in Xcode > Window > Devices and Simulators.
UPDATE: You can specify the iOS version for the simulator
react-native run-ios --simulator 'iPhone 6s (10.2)'
and it will attempt to find the correct simulator if there are multiple found.
https://github.com/facebook/react-native/issues/19069#issuecomment-385545599
OR rename your simulators in xcode to whatever you want
Right click and rename one of them so the names are unique, then react-native run-ios
started working.
Environment: Xcode: 10.2.1 React Native: 0.59.9
Upvotes: 1