`react-native run-ios` build failure on XCode 12.5 beta
See original GitHub issueAsk your Question
I’m getting a build error while attempting to test our react-native
app in XCode 12.5 beta. Apologies if this is inappropriate but it appears to be a real issue.
I’m running "react-native": "0.62.2"
(however, it doesn’t appear this is fixed in the lastest stable release)
It looks like this exact issue was fixed in https://github.com/facebook/react-native/pull/28362, which is part of 0.63+. This PR indicates it was fixed for Clang 10 but as far as I can tell the clang/llvm version hasn’t changed between 12.4 and 12.5. The app builds correctly when using 12.4 command line tools but not 12.5 beta command line tools (configured via XCode preferences).
The build error (with compiler):
** BUILD FAILED **
The following build commands failed:
CompileC .../Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React-Core.build/Objects-normal/x86_64/RCTCxxBridge.o /Users/bkraft/Projects/zabo-mobile/node_modules/react-native/React/CxxBridge/RCTCxxBridge.mm normal x86_64 objective-c++ com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
The stack trace is as follows,
/node_modules/react-native/React/CxxBridge/RCTCxxBridge.mm:331:34: error: cannot initialize a parameter of type 'NSArray<id<RCTBridgeModule>> *' with an rvalue of type 'NSArray<Class> *'
(void)[self _initializeModules:RCTGetModuleClasses() withDispatchGroup:prepareBridge lazilyDiscovered:NO];
^~~~~~~~~~~~~~~~~~~~~
/node_modules/react-native/React/CxxBridge/RCTCxxBridge.mm:771:82: note: passing argument to parameter 'modules' here
- (NSArray<RCTModuleData *> *)_initializeModules:(NSArray<id<RCTBridgeModule>> *)modules
^
/node_modules/react-native/React/CxxBridge/RCTCxxBridge.mm:776:79: error: cannot initialize a parameter of type 'NSArray<Class> *' with an lvalue of type 'NSArray<id<RCTBridgeModule>> *__strong'
NSArray<RCTModuleData *> *moduleDataById = [self _registerModulesForClasses:modules lazilyDiscovered:lazilyDiscovered];
^~~~~~~
/node_modules/react-native/React/CxxBridge/RCTCxxBridge.mm:618:76: note: passing argument to parameter 'moduleClasses' here
- (NSArray<RCTModuleData *> *)_registerModulesForClasses:(NSArray<Class> *)moduleClasses
^
/node_modules/react-native/React/CxxBridge/RCTCxxBridge.mm:827:69: error: cannot initialize a parameter of type 'NSArray<id<RCTBridgeModule>> *' with an lvalue of type 'NSArray<Class> *__strong'
NSArray<RCTModuleData *> *newModules = [self _initializeModules:modules withDispatchGroup:NULL lazilyDiscovered:YES];
^~~~~~~
/Users/bkraft/Projects/zabo-mobile/node_modules/react-native/React/CxxBridge/RCTCxxBridge.mm:771:82: note: passing argument to parameter 'modules' here
- (NSArray<RCTModuleData *> *)_initializeModules:(NSArray<id<RCTBridgeModule>> *)modules
Issue Analytics
- State:
- Created 3 years ago
- Reactions:38
- Comments:30 (1 by maintainers)
Top Results From Across the Web
React native 0.61.5 Build is failing on Xcode 12.5 beta
I am trying to migrate my project to Xcode 12.5 beta but the problem is that build is failing with message cannot initialise...
Read more >React Native App no longer builds … | Apple Developer Forums
My react native app previously built and ran on a simulator in xcode 11. However sine upgrading to xcode 12.5 i get the...
Read more >How to fix the error "The developer of this app needs to update ...
The signature generated by a build with XCode 12.4 or lower on a Mac running with Mac OS 10.14 or lower are invalid...
Read more >Failed to run react native on iOS after upgrading Xcode 12.5 ...
It's not just you, this is an open issue. Below are links to the issue thread and a troubleshooting guide: react-native run-ios build...
Read more >Using the macOS execution environment - CircleCI
jobs: build: macos: xcode: 13.4.1 steps: # Commands will execute in macOS container # with Xcode 12.5.1 installed - run: xcodebuild -version ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Modify the func at line 746 in RCTCxxBridge.mm from
Try this
Edit Podfile in ios directory like this ↓ =========================== use_flipper!
use_flipper!({ ‘Flipper-Folly’ => ‘2.3.0’ })