QuickCrypto uses OpenSSL via Swift Package Manager (SPM). On physical iOS devices, SPM frameworks require additional configuration to be properly embedded and code-signed in your app bundle.
Simulator builds work without this configuration. This is only required for physical device deployment.
Add to your ios/Podfile:
# At the top of your Podfile
require_relative '../node_modules/react-native-quick-crypto/scripts/quickcrypto_spm_fix'
target 'YourAppName' do
# ... your pods ...
post_install do |installer|
react_native_post_install(installer) # if you have this
# Fix QuickCrypto SPM framework signing for physical devices
quickcrypto_fix_spm_signing(installer)
end
endThen run:
cd ios && pod installWhen you try to install on a physical device without this fix, you'll see:
Failed to verify code signature of .../OpenSSL.framework : 0xe8008015
This happens because:
- OpenSSL is distributed as a pre-built, pre-signed xcframework via SPM
- CocoaPods'
spm_dependencyadds it to the Pods project but doesn't embed it in your app - The framework must be re-signed with your app's code signing identity
This is a known limitation of mixing CocoaPods + SPM. See issue #857.
If you have multiple app targets, specify which one:
quickcrypto_fix_spm_signing(installer, app_target_name: 'YourSpecificTarget')For XSalsa20 cipher support, set the environment variable before your target:
ENV['SODIUM_ENABLED'] = '1'
target 'YourAppName' do
# ...
endThis is the code signing error. Make sure you've added quickcrypto_fix_spm_signing(installer) to your Podfile's post_install hook and run pod install.
Same fix - the quickcrypto_fix_spm_signing function handles both embedding and signing.
- Clean build:
Cmd+Shift+Kin Xcode - Delete derived data:
rm -rf ~/Library/Developer/Xcode/DerivedData - Run
pod installagain - Rebuild
The helper script couldn't find your .xcodeproj file. Use the app_target_name parameter or check that your project structure is standard.
Yes, this is unfortunate. CocoaPods is being deprecated, SPM is supposed to be the future, but SPM's handling of binary frameworks with CocoaPods is broken. The spm_dependency bridge in React Native doesn't properly handle framework embedding and code signing.
This workaround will be unnecessary when React Native fully migrates to SPM (timeline unclear).