-
Notifications
You must be signed in to change notification settings - Fork 897
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
feat: Enable New Architecture with react-native.config.js #2091
feat: Enable New Architecture with react-native.config.js #2091
Conversation
} | ||
|
||
async function runPodInstall(loader: Ora, options?: RunPodInstallOptions) { | ||
const shouldHandleRepoUpdate = options?.shouldHandleRepoUpdate || true; | ||
try { | ||
loader.start( | ||
`Installing CocoaPods dependencies ${chalk.dim( | ||
'(this may take a few minutes)', | ||
)}`, | ||
); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡We can add here a log that New Architecture is enabled.
Q - How is this going to play with: |
@cortinico we could read this data from the manifest if present. Small feat to add, once we settle on the proposal. And since this is still a draft, we can align the API to mimic the one presented in the |
btw I'm not even sure that the RFC is in shape right now, wasn't it supposed to get re-written once again? |
Yes, I have to do it, but I have higher priority tasks to run first. However, I'm not a fan of having the same settings in multiple places. As soon as the RFC land, that should be the only place where user can enable/disable the new architecture. All other places and ways to set it should then be ignored. So, consider that when working on this feature. Part of the work you are doing could need to be removed later on. |
Summary:
Currently, to enable New Architecture, there is a need of running
RCT_NEW_ARCH_ENABLED=1 pod install
. This change introduces new param in config file:project.ios.newArchEnabled
which forces to run app with a given architecture. This change is caused by enabling pods installation inrun-ios
andbuild-ios
commands (#2077) - currently, if someone ranRCT_NEW_ARCH_ENABLED=1 pod install
and then added a package with native code, the script would disable New Arch. This PR allows to:Pods.xcodeproj/project.pbxproj
project.ios.newArchEnabled
field. In case anyone change the architecture by using a RCT_NEW_ARCH_ENABLED flag and the param in config is set, it will install the pods accordingly to the Architecture set in the configTest Plan:
run-ios
and check if project ran correctlyRCT_NEW_ARCH_ENABLED=1 pod install
andrun-ios
and verify iffabric: true
in Metro consolereact-native.config.js
with the following content:run-ios
and verifyfabric: true
is not visible in Metro logstrue
and runrun-ios
again - verifyfabric: true
is visible in Metro logsreact-native-gesture-handler
to the projectrun-ios
again, let the pods install and verifyfabric: true
is set in the Metro logspod install
inios
folder and runrun-ios
again, verify that pods are installed again andfabric: true
is visible in Metro logsChecklist