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 new architecture build for rn-macOS (macOS and iOS) #1781

Merged
merged 1 commit into from
Apr 8, 2023

Conversation

Saadnajmi
Copy link
Collaborator

@Saadnajmi Saadnajmi commented Apr 8, 2023

Copy of #1779 to main

====

Please select one of the following

  • I am removing an existing difference between facebook/react-native and microsoft/react-native-macos 👍
  • I am cherry-picking a change from Facebook's react-native into microsoft/react-native-macos 👍
  • I am making a fix / change for the macOS implementation of react-native
  • I am making a change required for Microsoft usage of react-native

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

rn-tester % RCT_NEW_ARCH_ENABLED=1 pod install

run it on macOS
Screenshot 2023-04-07 at 3 01 03 PM

run it on iOS

Screenshot 2023-04-07 at 3 05 46 PM

@Saadnajmi Saadnajmi requested a review from a team as a code owner April 8, 2023 00:49
@Saadnajmi Saadnajmi changed the title Fix RCT_NEW_ARCH_ENABLED for rn-macOS Fix new architecture build for rn-macOS (macOS and iOS) Apr 8, 2023
@Saadnajmi Saadnajmi enabled auto-merge (squash) April 8, 2023 01:13
@Saadnajmi Saadnajmi merged commit fc59df5 into microsoft:main Apr 8, 2023
@Saadnajmi Saadnajmi deleted the new-arch branch August 11, 2023 07:20
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