fix: install pods on ios-commands with New Arch#2122
fix: install pods on ios-commands with New Arch#2122TMisiukiewicz merged 4 commits intoreact-native-community:mainfrom
Conversation
| path.join(iosSourceDir, '/Pods/Pods.xcodeproj/project.pbxproj'), | ||
| ); | ||
|
|
||
| return project.includes('-DRCT_NEW_ARCH_ENABLED=1'); |
There was a problem hiding this comment.
@cipolleschi is this fine if we use that to detect new arch?
There was a problem hiding this comment.
yes, this should be enough.
thymikee
left a comment
There was a problem hiding this comment.
@TMisiukiewicz please rebase and merge? :)
| import {readFile} from 'fs-extra'; | ||
| import path from 'path'; | ||
|
|
||
| export default async function getArchitecture(iosSourceDir: string) { |
There was a problem hiding this comment.
We have the same logic in doctor command:
cli/packages/cli-doctor/src/commands/info.ts
Lines 55 to 64 in 36d00ea
mind using this function also there - so we won't have in two places same code? 🙏
There was a problem hiding this comment.
it's already here:
ef7a66a to
75a0e19
Compare
|
@szymonrybczak to resolve conflicts i moved |
| throw new CLIError( | ||
| `Something when wrong while installing CocoaPods. Please run ${chalk.bold( | ||
| 'pod install', | ||
| )} manually`, | ||
| ); |
There was a problem hiding this comment.
Hm, I'm wondering should we add here info about flags that we added 🤔
|
@TMisiukiewicz @szymonrybczak @cortinico , I am facing an issue. When we run the command run-ios, it uses a new arch-enabled flag via the getArchitecture function, which references Pods/Pods.xcodeproj/project.pbxproj. However, if someone runs the command pod-deintegrate, then running the run-ios command will always use the legacy architecture (fallback if file not found). Can you please check this? RCT_NEW_ARCH_ENABLED=1 pod install |
Summary:
Coming from #2091. Currently, when installed pods with New Architecture manually, added new package and used
run-ios, it installed pods with old Architecture again. This change checks if the New Architecture is enabled and installs it with/without a flag.Test Plan:
react-native-gesture-handlerrun-iosand verify it installed pods and ran the appiosfolder and install pods with New Arch manually,RCT_NEW_ARCH_ENABLED=1 pod installreact-native-reanimatedrun-iosand verify pods are being installed with awith New Architecturemessagefabric: trueis visible in Metro consoleChecklist