After updating 0.61.5 to 0.62.2 with Upgrade Helper, ENABLE_BITCODE error drives me crazy. Looks like it happens because of switching to OpenSSL-Universal (1.0.2.19) from openssl-ios-bitcode. Not any problem while creating fresh project but it happens on upgrading to 0.62.2.
It happens only debug mode on real iOS device
Trying to run on debug mode it gives error message on below.
ld: '... project path .../ios/Pods/OpenSSL-Universal/ios/lib/libcrypto.a(bio_lib.o)' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture arm64
It tried pod cache clear openssl-ios-bitcode by #27565 (comment) but it couldn't find openssl-ios-bitcode pod.
Any idea about it?
platform :ios, '9.0'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
def add_flipper_pods!(versions = {})
versions['Flipper'] ||= '~> 0.33.1'
versions['DoubleConversion'] ||= '1.1.7'
versions['Flipper-Folly'] ||= '~> 2.1'
versions['Flipper-Glog'] ||= '0.3.6'
versions['Flipper-PeerTalk'] ||= '~> 0.0.4'
versions['Flipper-RSocket'] ||= '~> 1.0'
pod 'FlipperKit', versions['Flipper'], :configuration => 'Debug'
pod 'FlipperKit/FlipperKitLayoutPlugin', versions['Flipper'], :configuration => 'Debug'
pod 'FlipperKit/SKIOSNetworkPlugin', versions['Flipper'], :configuration => 'Debug'
pod 'FlipperKit/FlipperKitUserDefaultsPlugin', versions['Flipper'], :configuration => 'Debug'
pod 'FlipperKit/FlipperKitReactPlugin', versions['Flipper'], :configuration => 'Debug'
# List all transitive dependencies for FlipperKit pods
# to avoid them being linked in Release builds
pod 'Flipper', versions['Flipper'], :configuration => 'Debug'
pod 'Flipper-DoubleConversion', versions['DoubleConversion'], :configuration => 'Debug'
pod 'Flipper-Folly', versions['Flipper-Folly'], :configuration => 'Debug'
pod 'Flipper-Glog', versions['Flipper-Glog'], :configuration => 'Debug'
pod 'Flipper-PeerTalk', versions['Flipper-PeerTalk'], :configuration => 'Debug'
pod 'Flipper-RSocket', versions['Flipper-RSocket'], :configuration => 'Debug'
pod 'FlipperKit/Core', versions['Flipper'], :configuration => 'Debug'
pod 'FlipperKit/CppBridge', versions['Flipper'], :configuration => 'Debug'
pod 'FlipperKit/FBCxxFollyDynamicConvert', versions['Flipper'], :configuration => 'Debug'
pod 'FlipperKit/FBDefines', versions['Flipper'], :configuration => 'Debug'
pod 'FlipperKit/FKPortForwarding', versions['Flipper'], :configuration => 'Debug'
pod 'FlipperKit/FlipperKitHighlightOverlay', versions['Flipper'], :configuration => 'Debug'
pod 'FlipperKit/FlipperKitLayoutTextSearchable', versions['Flipper'], :configuration => 'Debug'
pod 'FlipperKit/FlipperKitNetworkPlugin', versions['Flipper'], :configuration => 'Debug'
end
# Post Install processing for Flipper
def flipper_post_install(installer)
installer.pods_project.targets.each do |target|
if target.name == 'YogaKit'
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '4.1'
end
end
end
end
target 'dashboardMobile' do
# Pods for dashboardMobile
pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"
pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"
pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"
pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety"
pod 'React', :path => '../node_modules/react-native/'
pod 'React-Core', :path => '../node_modules/react-native/'
pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules'
pod 'React-Core/DevSupport', :path => '../node_modules/react-native/'
pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
pod 'React-Core/RCTWebSocket', :path => '../node_modules/react-native/'
pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
pod 'ReactCommon/callinvoker', :path => "../node_modules/react-native/ReactCommon"
pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon"
pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga', :modular_headers => true
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
pod 'RNCharts', :path => '../node_modules/react-native-charts-wrapper'
pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
use_native_modules!
# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable these next few lines.
add_flipper_pods!
post_install do |installer|
flipper_post_install(installer)
end
end
target 'OneSignalNotificationServiceExtension' do
pod 'OneSignal', '>= 2.9.3', '< 3.0'
end
System:
OS: macOS 10.15.4
CPU: (6) x64 Intel(R) Core(TM) i5-8500B CPU @ 3.00GHz
Memory: 896.27 MB / 8.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 13.11.0 - /usr/local/bin/node
Yarn: 1.22.4 - /usr/local/bin/yarn
npm: 6.13.7 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.8.3 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 13.4, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2
Android SDK:
API Levels: 23, 25, 28, 29
Build Tools: 28.0.3, 29.0.2
System Images: android-28 | Intel x86 Atom_64, android-28 | Google Play Intel x86 Atom, android-29 | Google APIs Intel x86 Atom, android-29 | Google Play Intel x86 Atom
Android NDK: Not Found
IDEs:
Android Studio: 3.5 AI-191.8026.42.35.5900203
Xcode: 11.4.1/11E503a - /usr/bin/xcodebuild
Languages:
Java: 1.8.0_222 - /usr/bin/javac
Python: 2.7.16 - /usr/bin/python
npmPackages:
@react-native-community/cli: Not Found
react: 16.11.0 => 16.11.0
react-native: 0.62.2 => 0.62.2
npmGlobalPackages:
*react-native*: Not Found
Changing bitcode settings "No" for Debug mode solved the problem.

| :warning: | Missing Environment Information |
|---|---|
| :information_source: | Your issue may be missing information about your development environment. You can obtain the missing information by running react-native info in a console. |
鈿狅笍 Missing Environment Information
鈩癸笍 Your issue may be missing information about your development environment. You can obtain the missing information by runningreact-native infoin a console.
Bad bot. I already share info!
Just noting that the solution was added to the bottom of the description, thanks for tracking it down @ezranbayantemur!
For changing the debug to No, triggered 14 other issues. Didn't solve my problem. I am stuck because I have this issue. Seems as if it's not ready for React Native 0.62.2
For changing the debug to No, triggered 14 other issues. Didn't solve my problem. I am stuck because I have this issue. Seems as if it's not ready for React Native 0.62.2
What kind of issues?
Removing because I think I posted in wrong repo, moved comment to https://github.com/facebook/flipper/issues/485
For changing the debug to No, triggered 14 other issues. Didn't solve my problem. I am stuck because I have this issue. Seems as if it's not ready for React Native 0.62.2
In my case, there was a OneSignal extension, so, you must change that config there too.
For changing the debug to No, triggered 14 other issues. Didn't solve my problem. I am stuck because I have this issue. Seems as if it's not ready for React Native 0.62.2
Same issue to me. another 16 other issues comes when set the debug to No
remove flipper works for me, although it's not a perfect solution....
https://github.com/facebook/flipper/issues/1326
Did this ever get fixed? I would prefer not to rip out flipper nor disable bitcode (isn't it a requirement for submitting to the App Store?)
You can disable bitcode for debug build only, though this is not optimal solution.
Why was this closed?
Definitely agree with others. I'd rather not remove flipper or disable bitcode. This issue should be re-opened
Why is it closed?
I've found a solution for it but looks like it's works only for me. So I'm re-opening it for you guys.
Running into this after I updated Xcode to v12.
ld: in /Users/user/Projects/example/ios/Pods/OpenSSL-Universal/ios/lib/libcrypto.a(cryptlib.o), building for iOS Simulator, but linking in object file built for iOS, file '/Users/user/Projects/example/ios/Pods/OpenSSL-Universal/ios/lib/libcrypto.a' for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
On "react-native": "0.62.2"
This might be use full for you guys
https://stackoverflow.com/questions/26031239/openssl-compilation-issue-with-ssl-export-keying-material/26031693#26031693
I'm seeing the same linker error as @justinjoyn after upgrading xcode to 12.0.
On 0.63.1
removing flipper solve the problem,
Any solutions?
On "react-native" 0.63.2 same error (Xcode 12)
Disabling bitcode not resolved this problem, i get more errors (26) 馃槙
Same error while upgrading from 0.62.2 to 0.63 on Xcode 11.7
Am also experiencing this error
Upgraded from RN 61.4 to 63.3 and also upgraded to xCode 12.0.1
ios/Pods/OpenSSL-Universal/ios/lib/libcrypto.a(bio_lib.o)' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
use_flipper!
post_install do |installer|
flipper_post_install(installer)
end
comment out these lines in Podfile, solve this error for me.
comment out these lines
use_flipper!
post_install do |installer|
flipper_post_install(installer)
end
then
pod install in your ios folder
then clean project
then build and run
Do you need help upgrading to a newer React Native version? Visit the Upgrade Support repository or use the upgrade helper to see the changes that need to be made to upgrade your app.
im experiencing this too. i already tried remove node_modules then npm install then pod install then build error still exist
It occurs after upgrade the macOS Mojave to maOS Catalina. (xCode 11 to xCode 12) I move the whole project file and just try to build.
Got this error:
in /Users/myuser/Desktop/myproject/ios/Pods/OpenSSL-Universal/ios/lib/libcrypto.a(cryptlib.o), building for iOS Simulator, but linking in object file built for iOS, file '/Users/myuser/Desktop/myproject/ios/Pods/OpenSSL-Universal/ios/lib/libcrypto.a' for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I removed the pod.lock file and pod install
It update the OpenSSL package then I clean the build
and finally try to get release build...
And failed.
Please help!!
I'm also running into this issue today. The issue shouldn't be closed or marked SOLVED
The solution just downgrade OpenSSL version to 1.0.2.18 it will working fine
but when i try this **pod 'OpenSSL-Universal', '~>1.0.2.18'** i getting this error [!] Unknown command:OpenSSL-Universal,``
Hi guys,
You can find the solution here.
this might be useful
There are a few solutions you can try, but the problem is with the pod OpenSSL-Universal 1.0.2.19 in a dependency somewhere.
I'd suggest:
Most likely the dependency has been update in the new pods pulled down from the above. (I think it might be flipper that updates that had the wrong dependency in the past which is why people fix it by disabling flipper)
You can also set the openssl dependency manually in the Podfile:
pod 'OpenSSL-Universal', '~>1.0.2.20'
Then run pod install again.
Either works, but the first suggestion, if works, lets the openssl dependency auto upgrade in the future.
Here is the full discussion at openssl land: https://github.com/krzyzanowskim/OpenSSL/issues/65
Most helpful comment
Just noting that the solution was added to the bottom of the description, thanks for tracking it down @ezranbayantemur!