'Duplicate symbol '_hasListeners' react native
I'm currently working on a project that requires both BLE and iWatch integration but for some reason when I install libraries to do both, I get this error
duplicate symbol '_hasListeners' in:
/Users/wilcox/Library/Developer/Xcode/DerivedData/project-id/Build/Products/Debug-iphonesimulator/RNAppleHealthKit/libRNAppleHealthKit.a(RCTAppleHealthKit.o) /Users/wilcox/Library/Developer/Xcode/DerivedData/project-id/Build/Products/Debug-iphonesimulator/react-native-ble-manager/libreact-native-ble-manager.a(BleManager.o)
I'm using the libraries https://github.com/innoveit/react-native-ble-manager and https://github.com/agencyenterprise/react-native-health
I've tried updating these libraries to the newest versions, cleaning the build folder and deleting derived data without any success. Is there anything I can do except hope the devs fix it?
Thanks
Solution 1:[1]
Find Pods - Development Pods - RNAppleHealthKit - RCTAppleHealthKit.m
And change:
bool hasListeners;
to:
static bool hasListeners;
And then build the project, will fix it.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | FaiChou |
