fix(harness): prepend RCT_NEW_ARCH_ENABLED=1 override to the Podfile - #26
Merged
Conversation
The React Native community CLI's `pod install` (via `react-native build-ios --force-pods`) always passes `RCT_NEW_ARCH_ENABLED='0'` in the child env when run through the `forceInstall` path — its bundled `install()` helper drops the `newArchEnabled` option before calling `installPods`, so neither the architecture sniffer nor any caller override matters. That trips Reanimated 4's podspec assertion and aborts pod install, even on a fresh RN 0.81 template whose Info.plist already says `RCTNewArchEnabled=true`. customizeIOS now prepends `ENV['RCT_NEW_ARCH_ENABLED'] = '1'` to the scaffolded Podfile so the env is corrected inside the same pod-install process, before use_native_modules! evaluates RNReanimated.podspec and before use_react_native! reads new_arch_enabled to drive codegen.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The React Native community CLI's
pod install(viareact-native build-ios --force-pods) always passesRCT_NEW_ARCH_ENABLED='0'in the child env when run through theforceInstallpath — its bundledinstall()helper drops thenewArchEnabledoption before callinginstallPods, so neither the architecture sniffer nor any caller override matters. That trips Reanimated 4's podspec assertion and aborts pod install, even on a fresh RN 0.81 template whose Info.plist already saysRCTNewArchEnabled=true. customizeIOS now prependsENV['RCT_NEW_ARCH_ENABLED'] = '1'to the scaffolded Podfile so the env is corrected inside the same pod-install process, before use_native_modules! evaluates RNReanimated.podspec and before use_react_native! reads new_arch_enabled to drive codegen.