when I am trying to run my react native app on the ios simulator I am getting this error.
Error:
duplicate symbol '_EXCanAskAgain' in:
/Users/harshmishra/Library/Developer/Xcode/DerivedData/myways-gkjarpvjrufpitdstvqcnasxhmrs/Build/Products/Debug-iphonesimulator/EXPermissions/libEXPermissions.a(EXPermissions.o)
/Users/harshmishra/Library/Developer/Xcode/DerivedData/myways-gkjarpvjrufpitdstvqcnasxhmrs/Build/Products/Debug-iphonesimulator/XCFrameworkIntermediates/UMReactNativeAdapter/UMReactNativeAdapter.framework/UMReactNativeAdapter(EXPermissionsService.o)
duplicate symbol '_EXExpiresKey' in:
/Users/harshmishra/Library/Developer/Xcode/DerivedData/myways-gkjarpvjrufpitdstvqcnasxhmrs/Build/Products/Debug-iphonesimulator/EXPermissions/libEXPermissions.a(EXPermissions.o)
/Users/harshmishra/Library/Developer/Xcode/DerivedData/myways-gkjarpvjrufpitdstvqcnasxhmrs/Build/Products/Debug-iphonesimulator/XCFrameworkIntermediates/UMReactNativeAdapter/UMReactNativeAdapter.framework/UMReactNativeAdapter(EXPermissionsService.o)
duplicate symbol '_EXGrantedKey' in:
/Users/harshmishra/Library/Developer/Xcode/DerivedData/myways-gkjarpvjrufpitdstvqcnasxhmrs/Build/Products/Debug-iphonesimulator/EXPermissions/libEXPermissions.a(EXPermissions.o)
/Users/harshmishra/Library/Developer/Xcode/DerivedData/myways-gkjarpvjrufpitdstvqcnasxhmrs/Build/Products/Debug-iphonesimulator/XCFrameworkIntermediates/UMReactNativeAdapter/UMReactNativeAdapter.framework/UMReactNativeAdapter(EXPermissionsService.o)
duplicate symbol '_EXPermissionExpiresNever' in:
/Users/harshmishra/Library/Developer/Xcode/DerivedData/myways-gkjarpvjrufpitdstvqcnasxhmrs/Build/Products/Debug-iphonesimulator/EXPermissions/libEXPermissions.a(EXPermissions.o)
/Users/harshmishra/Library/Developer/Xcode/DerivedData/myways-gkjarpvjrufpitdstvqcnasxhmrs/Build/Products/Debug-iphonesimulator/XCFrameworkIntermediates/UMReactNativeAdapter/UMReactNativeAdapter.framework/UMReactNativeAdapter(EXPermissionsService.o)
duplicate symbol '_EXStatusKey' in:
/Users/harshmishra/Library/Developer/Xcode/DerivedData/myways-gkjarpvjrufpitdstvqcnasxhmrs/Build/Products/Debug-iphonesimulator/EXPermissions/libEXPermissions.a(EXPermissions.o)
/Users/harshmishra/Library/Developer/Xcode/DerivedData/myways-gkjarpvjrufpitdstvqcnasxhmrs/Build/Products/Debug-iphonesimulator/XCFrameworkIntermediates/UMReactNativeAdapter/UMReactNativeAdapter.framework/UMReactNativeAdapter(EXPermissionsService.o)
duplicate symbol '_OBJC_CLASS_$_EXReactNativeUserNotificationCenterProxy' in:
/Users/harshmishra/Library/Developer/Xcode/DerivedData/myways-gkjarpvjrufpitdstvqcnasxhmrs/Build/Products/Debug-iphonesimulator/EXPermissions/libEXPermissions.a(EXReactNativeUserNotificationCenterProxy.o)
/Users/harshmishra/Library/Developer/Xcode/DerivedData/myways-gkjarpvjrufpitdstvqcnasxhmrs/Build/Products/Debug-iphonesimulator/XCFrameworkIntermediates/UMReactNativeAdapter/UMReactNativeAdapter.framework/UMReactNativeAdapter(EXReactNativeUserNotificationCenterProxy.o)
duplicate symbol '_OBJC_METACLASS_$_EXReactNativeUserNotificationCenterProxy' in:
/Users/harshmishra/Library/Developer/Xcode/DerivedData/myways-gkjarpvjrufpitdstvqcnasxhmrs/Build/Products/Debug-iphonesimulator/EXPermissions/libEXPermissions.a(EXReactNativeUserNotificationCenterProxy.o)
/Users/harshmishra/Library/Developer/Xcode/DerivedData/myways-gkjarpvjrufpitdstvqcnasxhmrs/Build/Products/Debug-iphonesimulator/XCFrameworkIntermediates/UMReactNativeAdapter/UMReactNativeAdapter.framework/UMReactNativeAdapter(EXReactNativeUserNotificationCenterProxy.o)
ld: 7 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I have tried cleaning the build folder, running pod install again but nothing works out. I am stuck on this error. I am not able to find what's causing this error. Also, I have checked myApp > Libraries folder there is nothing(empty folder).
I had exactly the same error after adding react-native-unimodules library to the app I am working on.
After several hours of trying different solutions we were able to fix the error by downgrading the react-native-unimodules library from the current 0.14.7 version to 0.13.3.
Hope it helps anyone else who encounters the issue.
The expo-permissions in the react-native-unimodules library 0.14.7 is outdated which caused the 7 duplicate symbols for architecture x86_64 in react native issue when you build the app. To fix this issue, you need to
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With