Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
feat: Enable Hermes to work on iOS #29914
Conversation
Base commit: 36b0f7d |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment has been hidden.
This comment has been hidden.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment has been hidden.
This comment has been hidden.
Summary: The nested `.gitattributes` file in `packages/react-native-codegen/android/` caused some confusion on Linux and macOS, causing Git to show `packages/react-native-codegen/android/gradlew.bat` as modified (CRLF removed, LF added). Instead of relying on repo-local `.gitattributes` files to convert endings in the working directory, the files should be committed to source control with the correct line endings in the first place. There is no reason to convert LF endings in .sh and many other file to CRLF on Windows (maybe this was an issue a long time ago, but unless Notepad is used this won't be a problem for practically all modern editors). Also fixed the line endings of `scripts/launchPackager.bat` which was incorrectly committed as LF. ## Changelog [Internal] [Fixed] - Line endings and .gitattributes Pull Request resolved: #29792 Test Plan: Clone repo on Linux, macOS, and Windows, and make sure no modified files show up. Reviewed By: fkgozali Differential Revision: D23546135 Pulled By: mdvacca fbshipit-source-id: 1572fcb959212f212b137066f1aa66f0bb6e86c3
This comment has been hidden.
This comment has been hidden.
|
Current status is:
Reverting that commit does fix the iOS build again, but I’m unsure of the ramifications. The proper fix would be to first build the macOS artefacts and then re-use its @Huxpro @TheSavior Do you have any thoughts on the best recourse/prioritization? Possible options I see are the following: Fastest turnaround timeThis could technically be released in a stable RN release.
Medium turnaround timeThis can not be released in a stable RN release.
Longest turnaround timeThis can definitely be released in a stable RN release.
|
|
@alloy thanks for the detailed summary! It seems like the real road blocking issue was just the JSI getting out of sync by d8b0e9d and we only need to do 2 and 3 of the "longest turnaround time" option to get this PR rolling again. We are working on a patch that include facebook/hermes@73594b5 and its dependencies onto the Hermes
It would be helpful to know what are the steps to repro so we can verify if the patch resolve the issue. I can still build RN Tester app on Android on RN master with the
Yeah, that would be the proper fix. At some point we'll need a hermes |
Make libevent work for static and framework builds
|
Here's additional option (on top of what @alloy already pointed out) as this PR is getting older and older and starts to have a lot of changes inside it:
Merge it and release a release candidate with a note that CC: @TheSavior |
|
I'm not sure what the all implications of that would be, but in general it seems totally reasonable to land parts of this PR to make things easier on you instead of batching them altogether. You and @alloy can decide what the right call is here. |
Base commit: 97d6f2e |
Agreed.
Perfect
The failure is a build time failure. Try building this PR with dynamic frameworks enabled and then build: cd packages/rn-tester
env USE_FRAMEWORKS=1 pod install
Gotcha |
I’m in favour. I’d perhaps even go farther and not promise it to be fixed in a RC, just at a later time. |
Interestingly, Flipper doesn't work with # Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable these next few lines.https://github.com/facebook/react-native/blob/master/template/ios/Podfile#L20-L23 Could that be related? Either way, I think we're good. |
|
Opening #30300 restarted CircleCI. Yay! |
|
All tests are passing except This PR is ready to land. We may want to disable the failing job so that the CI remains green. Hope this can be done while landing to avoid re-running all tests. If not, I will submit another commit. |
Co-authored-by: Eloy Durán <eloy.de.enige@gmail.com>
|
@facebook-github-bot import |
|
@yungsters has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
|
This pull request was successfully merged by @grabbou in c95ee5a. When will my fix make it into a release? | Upcoming Releases |

Summary
This PR makes it possible to build iOS applications with Hermes. Note that it doesn't work with
use_frameworks!just yet.Fixes #27845 (by downgrading iOS deployment target for RCT-Folly to 9.0)
Fixes #28810 (as above)
Checklist:
yarn linkits master to this project)i386to Hermes framework and enable BitcodeChangelog
[IOS] [FEATURE] - Enable Hermes on iOS
[INTERNAL] - Upgrade to CocoaPods 1.10.0 to resolve Xcode 12.0 issues
[INTERNAL] - Upgrade to Xcode 12.0 on the CircleCI
[INTERNAL] - Fix building RNTester in Release mode
[INTERNAL] - Fix build-time errors of
libeventwithuse_frameworks![INTERNAL] - Introduce
USE_HERMESvariable and test all RNTester configurations on the CI[INTERNAL] - Do not fetch CocoaPods repository since we're using CDN anyway
Test Plan
Turn on
hermes_enabledto true in yourPodfile, install pods, and run the iOS application. Your app should be running Hermes now.Preview: (note "Engine: Hermes")