Fix OpenSSL Bug for M1 arm64 Mac support by upgrading Folly dep
See original GitHub issuePlease provide all the information requested. Issues that do not follow this format are likely to stall.
Description
I believe the latest Folly release has the OpenSSL support needed to get it working on an M1 Mac see this commit https://github.com/facebook/folly/commit/74c66ce23f7da460cbf5106225476d69b76ece0a
React Native version:
Run react-native info
in your terminal and copy the results here.
0.63.4
Steps To Reproduce
Provide a detailed list of steps that reproduce the issue.
- Pod install
- Build Project
- Project builds 100%, then throws OpenSSL error
Expected Results
Describe what you expected to happen. Should not throw an OpenSSL error after building
Snack, code example, screenshot, or link to a repository:
Please provide a Snack (https://snack.expo.io/), a link to a repository on GitHub, or provide a minimal code example that reproduces the problem. You may provide a screenshot of the application if you think it is relevant to your bug report. Here are some tips for providing a minimal example: https://stackoverflow.com/help/mcve
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:6
Top GitHub Comments
Have the same problem with React Native app from scratch. Was made a few days ago and was launching with out any troubles until today. Get the error after Xcode build:
I have found the cause of the error: This error indicates that OpenSSL is built containing the simulator slice (x86_64) with the iOS device slice (arm64). Combining device and simulator into a single binary file is not a supported build configuration, and never has been. With the introduction of M1 Macs, where the simulator is also arm64 now, Xcode is looking for a arm64 slice intended for the simulator, but finding one only valid for use on a device, and letting you know of this issue.
The solution is to rebuild OpenSSL. If you intend to use it as a a pre-built binary, rather than compiling from source during your app’s build, it needs to be inside of an XCFramework. XCFrameworks are purposefully designed to separate device and simulator builds into separate files and avoid this class of error.
Guys can you tell me please why OpenSSL is built containing the simulator slice (x86_64) in React Native? And how to rebuild OpenSSL? And how do you solve it in your project?
closing this - the problem was resolved by installing the necessary xcode tools