-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
Summary
When using react-native-libsodium 1.5.0 on the old React Native architecture (ENV['RCT_NEW_ARCH_ENABLED'] != '1'), pod install completes but the Xcode build still fails because the podspec points to a non-existent XCFramework:
s.vendored_frameworks = "libsodium/build/libsodium-apple/Clibsodium.xcframework"The npm package only ships the static libraries (ios/lib/libsodium.a and ios-simulators/lib/libsodium.a), so CocoaPods can’t find the expected Clibsodium.xcframework and linking fails (ld: library 'sodium' not found).
Steps to reproduce
- Install
[email protected]in a project that still uses the old architecture. - Run
cd ios && pod install. - Build for the iOS simulator.
Expected
pod install and the Xcode link step succeed because the vendored framework exists.
Actual
pod install completes, but building the app fails with ld: library 'sodium' not found unless I manually create libsodium/build/libsodium-apple/Clibsodium.xcframework on my machine.
# local workaround (needed to unblock builds)
xcodebuild -create-xcframework \
-library node_modules/react-native-libsodium/libsodium/build/libsodium-apple/ios/lib/libsodium.a \
-headers node_modules/react-native-libsodium/libsodium/build/libsodium-apple/ios/include \
-library node_modules/react-native-libsodium/libsodium/build/libsodium-apple/ios-simulators/lib/libsodium.a \
-headers node_modules/react-native-libsodium/libsodium/build/libsodium-apple/ios-simulators/include \
-output node_modules/react-native-libsodium/libsodium/build/libsodium-apple/Clibsodium.xcframework
Proposed fix
Either:
- Ship
libsodium/build/libsodium-apple/Clibsodium.xcframeworkinside the npm tarball, matching the current podspec.
alextoudic, balsick, lisimba and jikyu
Metadata
Metadata
Assignees
Labels
No labels