iosxcodereact-nativexcode16

Could not build module 'UIKit' - XCode Version 16.2 React Native iOS


I've been trying to solve this error for quite some time and have not been successful. Anytime I try to Archive or Build my app, I keep getting UIKit, CoreFoundation, Darwin Foundation, "Could not build module" error.

I've tried cleaning DerivedData, re-installing Pods, re-installing XCode and I'm still stuck with this bug :(

react-native-cli: 2.0.1
react-native: 0.77.1

Image of Errors


Solution

  • I ended up migrating my React Native + Firebase project using the stable RN version 0.76.6 since the latest RN version 0.77.0 is causing a lot of RN issues. Also downgraded react-native-screens because its latest 4.7.0 version has a few issues causing builds to fail.

    This was the only solution that actually worked for me after many attempts at different potential solutions. Thanks everyone, and for reference here’s a github discussion: https://github.com/facebook/react-native/issues/48462