-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
chore: suggest adding flag in Podfile instead of console #4284
base: main
Are you sure you want to change the base?
Conversation
PR changing the suggested way of switching the new/old arch on `iOS` so it is similar to `Android`. Also, it seems more reasonable to have it in the `Podfile`, otherwise you (and your whole team) would have to remember about doing it every time.
✅ Deploy Preview for react-native ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Out of curiosity, should the new arch be enabled using environmental variable or inside Podfile? use_react_native!(
...
new_arch_enabled: true,
...
) |
@@ -230,8 +230,10 @@ If, for any reasons, you can't use the New Architecture, you can still opt-out f | |||
### iOS | |||
1. Install your CocoaPods dependencies with the command: | |||
1. Open the `ios/Podfile` file | |||
2. Add `ENV['RCT_NEW_ARCH_ENABLED'] = '0'` in the main scope of the file |
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.
in the main scope of the file
Can we simplify this? Or can we add a diff
block to explain this?
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.
add a diff block to explain this?
People often have many different things in their Podfile
so not sure about the diff. What about:
2. Add ENV['RCT_NEW_ARCH_ENABLED'] = '0'
at the top of the file
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.
2. Add `ENV['RCT_NEW_ARCH_ENABLED'] = '0'` in the main scope of the file | |
2. Add `ENV['RCT_NEW_ARCH_ENABLED'] = '0'` in the main scope of the Podfile ([reference Podfile](https://github.com/react-native-community/template/blob/0.76-stable/template/ios/Podfile) in the template) | |
```diff | |
+ ENV['RCT_NEW_ARCH_ENABLED'] = '0' | |
# Resolve react_native_pods.rb with node to allow for hoisting | |
require Pod::Executable.execute_command('node', ['-p', | |
'require.resolve( |
@j-piasecki the two approach are alternatives. The Podfile used to be much leaner when I introduced the parameter, thus easier to use.. |
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.
Accepting to unblock, I'm good with @cipolleschi comment
PR changing the suggested way of switching the new/old arch on
iOS
so it is similar toAndroid
. Also, it seems more reasonable to have it in thePodfile
, otherwise you (and your whole team) would have to remember about doing it every time.