rnfbdemo: Building iOS to a real device fails
When building the rnfbdemo project to real iOS device it fails with the below error
Link folly
ld: -U and -bitcode_bundle (Xcode setting ENABLE_BITCODE=YES) cannot be used together
clang: error: linker command failed with exit code 1 (use -v to see invocation)
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 3
- Comments: 17 (6 by maintainers)
Turns out (from the related PR on react-native) that this may always be incompatible with bitcode but apparently bitcode is deprecated in Xcode 14 anyway. So, it is perhaps best to simply disable it, then there’s no problem. In Podfile in postinstall this will do it, I will probably update make-demo.sh to do this when I get a chance
Disabling Bitcode started giving me errors with other libraries like Reanimated. I ended up using framework with the option
use_frameworks! :linkage => :staticand it solved the problemThis workaround solved the issue for me, but I also had to disable Bitcode for release builds in my project’s XCode config.
@mikehardy I created a new project using 69.1 and got the same error on a real device
Error
nice finding for it’s jsc not hermes by the
__jsiExecutorDescription. i proposed a pr in https://github.com/facebook/react-native/pull/34222 let’s see how do people think for this approach.Yes - other libraries may have issues as well, it really is a big change, thanks for reporting what worked, that will help me and others going forward!
Thanks again for bringing this up - I tagged you in the related react-native discussions for well-earned credit, of course unsubscribe if it’s bothersome (and, apologies) - I dropped that part of the patch and make sure hermes is not enabled in make-demo.sh now, so it works with react-native 0.69.0 - I’ll have to reverse that part of the patch as a forward-port to react-native 0.69.1, I’ll do that in a bit