Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Hermes not available on iOS when use_frameworks enabled #3491

Merged

Conversation

skaldo
Copy link
Contributor

@skaldo skaldo commented Aug 18, 2022

Description

When there are frameworks used and Hermes enabled in the Podfile of your project, RN falls back to JSC in debug mode and crashes in production mode.

This PR makes it possible to use Hermes when there is use_frameworks! enabled in the Podfile.

Thanks @Kudo who originally fixed this issue in ReactNative repository: facebook/react-native#34222

Changes

Added path to Framework Search Paths in Podspec of react-native-reanimated.

Test code and steps to reproduce

  1. Create empty ReactNative project
  2. Add react-native-reanimated dependency.
  3. For ReactNative 0.69.3 apply patch from: https://github.com/facebook/react-native/pull/34222/files
  4. Enable frameworks in Podfile: use_frameworks! :linkage => :static
  5. Build project in debug mode -> you will not see engine: hermes in top right corner.
  6. Build project in release mode -> app will crash at startup

Checklist

  • Included code example that can be used to test this change
  • Updated TS types
  • Added TS types tests
  • Added unit / integration tests
  • Updated documentation
  • Ensured that CI passes

@tr3v3r
Copy link

tr3v3r commented Aug 27, 2022

Can confirm that the fix works.

Copy link
Member

@piaskowyk piaskowyk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your PR! 😍

@piaskowyk piaskowyk merged commit f5085a2 into software-mansion:main Oct 20, 2022
piaskowyk pushed a commit that referenced this pull request Oct 20, 2022
When there are frameworks used and Hermes enabled in the Podfile of your
project, RN falls back to JSC in debug mode and crashes in production
mode.

This PR makes it possible to use Hermes when there is `use_frameworks!`
enabled in the Podfile.

Thanks @Kudo who originally fixed this issue in ReactNative repository:
facebook/react-native#34222

Added path to `Framework Search Paths` in Podspec of
react-native-reanimated.

1. Create empty ReactNative project
2. Add react-native-reanimated dependency.
3. For ReactNative 0.69.3 apply patch from:
https://github.com/facebook/react-native/pull/34222/files
4. Enable frameworks in Podfile: `use_frameworks! :linkage => :static`
5. Build project in debug mode -> you will not see `engine: hermes` in
top right corner.
6. Build project in release mode -> app will crash at startup

- [ ] Included code example that can be used to test this change
- [ ] Updated TS types
- [ ] Added TS types tests
- [ ] Added unit / integration tests
- [ ] Updated documentation
- [ ] Ensured that CI passes
fluiddot pushed a commit to wordpress-mobile/react-native-reanimated that referenced this pull request Jun 5, 2023
…-mansion#3491)

## Description

When there are frameworks used and Hermes enabled in the Podfile of your
project, RN falls back to JSC in debug mode and crashes in production
mode.

This PR makes it possible to use Hermes when there is `use_frameworks!`
enabled in the Podfile.

Thanks @Kudo who originally fixed this issue in ReactNative repository:
facebook/react-native#34222

## Changes

Added path to `Framework Search Paths` in Podspec of
react-native-reanimated.

## Test code and steps to reproduce

1. Create empty ReactNative project
2. Add react-native-reanimated dependency.
3. For ReactNative 0.69.3 apply patch from:
https://github.com/facebook/react-native/pull/34222/files
4. Enable frameworks in Podfile: `use_frameworks! :linkage => :static`
5. Build project in debug mode -> you will not see `engine: hermes` in
top right corner.
6. Build project in release mode -> app will crash at startup

## Checklist

- [ ] Included code example that can be used to test this change
- [ ] Updated TS types
- [ ] Added TS types tests
- [ ] Added unit / integration tests
- [ ] Updated documentation
- [ ] Ensured that CI passes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants