Skip to content

fix(ci): make react-native-macos-init job pass#2917

Merged
Saadnajmi merged 4 commits intomicrosoft:mainfrom
Saadnajmi:fix-macos-platform-config-main
Apr 11, 2026
Merged

fix(ci): make react-native-macos-init job pass#2917
Saadnajmi merged 4 commits intomicrosoft:mainfrom
Saadnajmi:fix-macos-platform-config-main

Conversation

@Saadnajmi
Copy link
Copy Markdown
Collaborator

Summary

Forward-port of the fixes from #2915 (0.81-stable).

Test plan

  • CI "Test react-native-macos init" job passes

🤖 Generated with Claude Code

Three fixes for the CI "Test react-native-macos init" job:

1. Simplify apple platform resolution in react-native.config.js to
   use the same pattern as ios/android (resolve from cwd directly).

2. Use glob patterns in package.json files array ("scripts/cocoapods/**"
   instead of "scripts/cocoapods") so yarn pack includes directory
   contents. See facebook#56407.

3. Replace `npm install <local-path>` (creates symlinks) with
   `yarn pack` + `npm install <tarball>` + `chmod +x`. The symlink
   approach caused module instance duplication (setFrameworkDefaults
   targeting wrong @react-native/metro-config instance) and missing
   pre-generated codegen headers. The tarball approach matches what
   users get from npm.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Saadnajmi Saadnajmi requested a review from a team as a code owner April 11, 2026 04:10
@Saadnajmi Saadnajmi changed the title fix: fix "Invalid platform macos" in init integration test fix(ci): make react-native-macos-init job pass Apr 11, 2026
Saadnajmi and others added 3 commits April 10, 2026 21:31
The previous glob only matched scripts/*.sh and scripts/xcode/*.sh
but missed scripts/react_native_pods_utils/script_phases.sh. Use
find to recursively chmod all .sh files.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Saadnajmi Saadnajmi merged commit aee05bb into microsoft:main Apr 11, 2026
17 checks passed
@Saadnajmi Saadnajmi deleted the fix-macos-platform-config-main branch April 11, 2026 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants