Build failed after update Xcode 13.2.1 beta Cannot initialize a parameter of type 'NSArray<id<RCTBridgeModule>> *' with an rvalue of type 'NSArray<Class> *'
See original GitHub issueNew Version
0.62.2
Old Version
0.62…
Build Target(s)
iOS
Output of react-native info
info Fetching system and libraries information… System: OS: macOS 11.6.2 CPU: (6) x64 Intel® Core™ i5-8500 CPU @ 3.00GHz Memory: 118.82 MB / 64.00 GB Shell: 5.8 - /bin/zsh Binaries: Node: 15.6.0 - /usr/local/bin/node Yarn: Not Found npm: 7.4.0 - /usr/local/bin/npm Watchman: Not Found Managers: CocoaPods: 1.10.1 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.2, iOS 15.2, macOS 12.1, tvOS 15.2, watchOS 8.3 Android SDK: API Levels: 29, 30 Build Tools: 28.0.3, 29.0.2, 30.0.3 System Images: android-30 | Google APIs Intel x86 Atom, android-30 | Google Play Intel x86 Atom Android NDK: Not Found IDEs: Android Studio: 4.1 AI-201.8743.12.41.6953283 Xcode: 13.2.1/13C100 - /usr/bin/xcodebuild Languages: Java: Not Found Python: 2.7.16 - /usr/bin/python npmPackages: @react-native-community/cli: Not Found react: ~16.11.0 => 16.11.0 react-native: ~0.62.2 => 0.62.2 npmGlobalPackages: react-native: Not Found
Issue and Reproduction Steps
Upgraded to XCODE 13.2.1 from XCODE 12.x; now can not build for iOS.
ERROR
Showing Recent Errors Only
../node_modules/react-native/React/CxxBridge/RCTCxxBridge.mm:331:34: Cannot initialize a parameter of type 'NSArray<id<RCTBridgeModule>> *' with an rvalue of type 'NSArray<Class> *'
Showing Recent Errors Only
../node_modules/react-native/React/CxxBridge/RCTCxxBridge.mm:776:79: Cannot initialize a parameter of type 'NSArray<Class> *' with an lvalue of type 'NSArray<id<RCTBridgeModule>> *__strong'
Showing Recent Errors Only
../node_modules/react-native/React/CxxBridge/RCTCxxBridge.mm:827:69: Cannot initialize a parameter of type 'NSArray<id<RCTBridgeModule>> *' with an lvalue of type 'NSArray<Class> *__strong'
I patched the flipper error by commenting out
#add_flipper_pods!
# post_install do |installer|
# flipper_post_install(installer)
# end
But the find_and_replace()
patch I can find for NSArray that was for 12.5 here is not working for XCODE 13.2.1.
The goal is to get this app to at least build again.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:8
Top GitHub Comments
react-native: “^0.57.5” macos version:12.1 Xcode:13.2.1 遇到了楼上一样的问题,怎么解决?
I’m having the same exact issue actually, RN 0.61, XCode 13.2.1, OSX 11.6 (Big Sur) and the proposed fix doesn’t work anymore ❌
EDIT: After investigation, this worked in my case:
fix-ios.sh
in your project root with this inside:chmod a+x fix-ios.sh && ./fix-ios.sh
yarn react-native run-ios