Skip to content

Commit be1dc9c

Browse files
evan-masseauclaude
andcommitted
fix(ci): set RCT_NEW_ARCH_ENABLED=1 for iOS pod install and archive
Without this env var the Podfile's new-architecture branch doesn't run, so codegen artifacts like RCTAppDependencyProvider.h are never produced, even though Pod targets that depend on them (e.g. ReactAppDependencyProvider) still get wired into the Pods project. The mismatch surfaces at archive time as lstat(.../build/generated/ios/RCTAppDependencyProvider.h): No such file or directory Setting RCT_NEW_ARCH_ENABLED=1 at both the pod install and xcodebuild steps mirrors what the existing iOS compile CI workflow does for its new-arch matrix slice and matches RN 0.81's default of new-arch on. Part of MAGE-464 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 5c49410 commit be1dc9c

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

.github/workflows/publish-example.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,9 +213,18 @@ jobs:
213213
# generated by pod install and pins NODE_BINARY at the path of node at
214214
# install time; we delete it so the Xcode build phase falls back to
215215
# `command -v node`, which resolves to the setup-node binary on $PATH.
216+
#
217+
# RCT_NEW_ARCH_ENABLED=1 is required for RN's new-architecture codegen
218+
# to run during pod install. Without it, Pods like ReactAppDependencyProvider
219+
# are still wired into the Pods project but the codegen outputs they
220+
# depend on (e.g. RCTAppDependencyProvider.h) never get generated, and
221+
# xcodebuild archive fails on missing headers. RN 0.81's default is
222+
# new-arch on; matching that here keeps the example app representative.
216223
- name: Install CocoaPods dependencies
217224
working-directory: example/ios
218225
shell: bash
226+
env:
227+
RCT_NEW_ARCH_ENABLED: '1'
219228
run: |
220229
bundle exec pod install --repo-update
221230
rm -f .xcode.env.local
@@ -328,6 +337,10 @@ jobs:
328337
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
329338
ASC_KEY_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ID }}
330339
ASC_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ISSUER_ID }}
340+
# New architecture must be enabled at archive time too — some RN
341+
# build-phase scripts read this env var directly to decide whether
342+
# to invoke codegen and pull in the generated provider files.
343+
RCT_NEW_ARCH_ENABLED: '1'
331344
# Prevent Metro from trying to start a dev server during the build
332345
CI: true
333346
shell: bash

0 commit comments

Comments
 (0)