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

build: Upgrade to React Native 0.73 (iOS) #6612

Conversation

dcalhoun
Copy link
Member

@dcalhoun dcalhoun commented Feb 6, 2024

Upgrade the iOS code for React Native 0.73.

To test: Will be tested later as a part of WordPress/gutenberg#58475.

PR submission checklist:

  • I have considered adding unit tests where possible.
  • I have considered if this change warrants user-facing release notes more info and have added them to RELEASE-NOTES.txt if necessary.

@@ -20,7 +20,7 @@ def setup_rnreanimated_pod_from_fork
puts "[Gutenberg] Set REACT_NATIVE_NODE_MODULES_DIR env var for RNReanimated to #{rn_node_modules}"

# Use a custom RNReanimated version while we coordinate a fix upstream
pod 'RNReanimated', git: 'https://github.com/wordpress-mobile/react-native-reanimated', branch: 'wp-fork-2.17.0'
pod 'RNReanimated', git: 'https://github.com/wordpress-mobile/react-native-reanimated', branch: 'wp-fork-3.6.2'
Copy link
Member Author

Choose a reason for hiding this comment

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

react-native-reanimated 3.x is required for React Native 0.73 compatibility.

Comment on lines -81 to -85
# The following workaround is needed to avoid the error `typedef redefinition with different types ('uint8_t' (aka 'unsigned char') vs 'enum clockid_t')`.
# This solution is referenced in https://github.com/facebook/react-native/issues/39568#issuecomment-1762890606.
# It will be needed until RCT-Folly version is bumped in React Native to version v2022.08.29.00 or above.
# Referece: https://github.com/facebook/folly/commit/4a2410fae65afb85e1fec6d922005054b05de59f
__apply_Xcode_12_5_M1_post_install_workaround(installer)
Copy link
Member Author

Choose a reason for hiding this comment

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

The __apply_Xcode_12_5_M1_post_install_workaround method was removed from React Native core as it is no longer necessary.

Copy link
Member Author

Choose a reason for hiding this comment

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

I was required to delete the Podfile.lock file entirely to get pod install to succeed. Otherwise, I encountered an infinite loop of incompatible Pod versions.

Copy link
Member Author

Choose a reason for hiding this comment

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

These changes were a result of running npm run xcframework:build.

Copy link
Member Author

Choose a reason for hiding this comment

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

These changes and the others to sibling podspec files were the result of running the ./bin/generate-podspecs.sh script.

Required for compatibility with React Native 0.73.
This method no longer exists after the React Native 0.73 upgrade. It is
also no longer necessary.
This is the result of running the following command.

```
npm run xcframework:build
```

It also required deleting the `Podfile.lock` entirely, as installing
pods failed due a loop of errors and requests to update individual pods
in search of compatible versions between pods.
Without wrapping this in `act` an error is thrown in the test.
Some CLI commands were hoisted from the dedicated CLI package into
React Native core. Without React Native installed in the top level of
this project, scripts will fail due to missing commands.

This is considered a workaround currently. It would be ideal to avoid
the need to duplicate this dependency that is already within the
Gutenberg core project, but it may be unavoidable due to the CLI changes
in core.
@dcalhoun dcalhoun force-pushed the build/upgrade-to-react-native-0.73-iOS branch from e09ff7f to a6597d2 Compare February 8, 2024 21:54
@dcalhoun dcalhoun marked this pull request as ready for review February 8, 2024 21:59
@dcalhoun dcalhoun merged commit 98acc57 into version-toolkit/gutenberg/build/upgrade-to-react-native-0.73 Feb 8, 2024
0 of 2 checks passed
@dcalhoun dcalhoun deleted the build/upgrade-to-react-native-0.73-iOS branch February 8, 2024 22:02
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.

1 participant