react-native-health
react-native-health copied to clipboard
Build fails with error "Duplicate symbols for architecture x86_64" under Xcode
I'm using the react-native-health and the react-native-ble-manager libraries in the same project. The problem is that both libraries have a property called hasListeners, which causes the error "Duplicate symbols for architecture x86_64" under Xcode. I can fix it by setting 'NO COMMON BLOCKS' to NO inside XCode -> Pods, but I was wondering whether the names of these properties can be changed in the original places so they don't cause conflicts.
I have the same error with same packages.
❌ duplicate symbol '_hasListeners' in
> libRNAppleHealthKit.a(RCTAppleHealthKit.o)
> libreact-native-ble-manager.a(BleManager.o)
❌ ld: 1 duplicate symbol for architecture x86_64
❌ clang: error: linker command failed with exit code 1 (use -v to see invocation)
I found another solution here: https://stackoverflow.com/questions/71500066/duplicate-symbol-haslisteners-react-native But this solution requires create a fork of react-native-health and change RCTAppleHealthKit.m
I hope for a correct fix
Any updates ?