Fix new architecture build for rn-macOS (macOS and iOS) #1781
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Copy of #1779 to main
====
Please select one of the following
Summary
In rn-macOS 0.71 we have
https://github.com/microsoft/react-native-macos/tree/main/Libraries/AppDelegate
which pass the necessary RCT_NEW_ARCH_ENABLED flag to it's .h and .mm files
https://github.com/microsoft/react-native-macos/blob/main/Libraries/AppDelegate/React-RCTAppDelegate.podspec#L24
We also have:
https://github.com/microsoft/react-native-macos/tree/main/React/AppSetup
which DO NOT pass RCT_NEW_ARCH_ENABLED flag because it gets inherited from:
https://github.com/microsoft/react-native-macos/blob/main/React-Core.podspec
Instead of fixing the latter .podspec we just carry over a more recent rn 0.72 change > moving all files into the same folder / podspec
https://github.com/facebook/react-native/tree/main/packages/react-native/Libraries/AppDelegate
Changelog
[MACOS] [FIXED] - Fix new architecture build for rn-macOS (macOS and iOS)
Test Plan
Create new architecture app
run it on macOS

run it on iOS