I’ve been trying to build a react-native (0.68.5) app via the ios simulator, which used to run ok when using Xcode 14.2, but now that I upgraded my Xcode version to 14.3 the app just won’t compile. The errors I’m getting are:
- fatal error: module ‘React’ in AST file …/React-Core.modulemap
- No such module ‘ExpoModulesCore’
I’ve created other projects from scratch and they work just fine, so I guess this is related to this project configuration.
I partially got the app to compile through Xcode by setting the Precompiled Bridging Header to No and using a Simulator with x86_64 architecture, but it doesn’t connect to react-native cli, and when running react-native run-ios I keep getting the No such module ‘ExpoModulesCore’ error.
The steps I do to try to build the app are:
yarn install
cd ios && pod install
yarn ios
(react-native run-ios
)
I’ve tried to delete node_modules
folder and yarn clean cache
followed by a yarn install
and it doesn’t work.
I’ve also tried to do a arch -x86_64 yarn ios
didn’t work.
I’ve tried adding to my Podfile
this line config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
and didn’t work.
And now in Xcode 14.3 the option to open using Rosetta was deleted.
2
Answers
Update: Fixed this by uninstalling everything related to xcode and re installing Xcode 14.2, enabled open with rosetta option and re-do the steps mentioned on my original question.
There have been reported issues with React Native and xCode 14.3. It’s been released patches for React Native version range 69 -> 71, so you might need to upgrade your React Native.
See https://www.reddit.com/r/reactnative/comments/12b5gn3/beware_of_xcode_143/ and https://twitter.com/Kelset/status/1642945598780485632?s=20