I have a react native project running on react native version 0.59.8 , and xcode version 10.3. Somehow my xcode got updated to version 11.0 and after that i am unable to build the project using react-native run-ios
command.
I have tried cleaning up the build and building again. But that doesn't help.
I am getting the following error:
CoreData: annotation: Failed to load optimized model at path '/Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/Frameworks/InstrumentsPackaging.framework/Versions/A/Resources/XRPackageModel.momd/XRPackageModel 9.0.omo'
error Could not find iPhone X simulator.
How to fix this issue?
You will need Node, Watchman, the React Native command line interface, Xcode and CocoaPods. While you can use any editor of your choice to develop your app, you will need to install Xcode in order to set up the necessary tooling to build your React Native app for iOS.
Once you have your React Native project initialized, you can run npx react-native run-ios inside the newly created project directory. If everything is set up correctly, you should see your new app running in the iOS Simulator shortly.
The main difference between React Native and Swift is that React Native is best for cross-platform development, while Swift is for building iOS apps. Thus, you may develop an Android application in Java or Kotlin, for example, and choose Swift and Objective-C for iOS only.
Not sure about the first error, but I have same problem for second error error Could not find iPhone X simulator
after upgrade to XCode 11
Basically I changed the line 53 in the react native project /node_modules/react-native/local-cli/runIOS/findMatchingSimulator.js
, from simulator.isAvailable !== 'YES'
to simulator.isAvailable !== true
.
The root cause is new XCode 11 changed the simulator metadata format, and react native findMatchingSimulator method is strongly coupled to the previous format.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With