Skip to content

Improves spm deintegrate script to handle more edge-cases - #57930

Open
ospfranco wants to merge 1 commit into
react:mainfrom
ospfranco:ospfranco/spm-script-improvements
Open

Improves spm deintegrate script to handle more edge-cases#57930
ospfranco wants to merge 1 commit into
react:mainfrom
ospfranco:ospfranco/spm-script-improvements

Conversation

@ospfranco

Copy link
Copy Markdown
Contributor

Summary:

The SPM deintegrate script can fail in subtle ways on certain edge cases. This PR aims to improve:

  • The script only handles single-line use_react_native!(...) calls. If the podfile has been modified then the stripping doesn't work correctly
  • The script does not turn off automaticPodsInstallation in the host app react-native.config.js, without this pods gets re-installed and the SPM project fails
  • The existing .xcworkspace does not get completely cleared of the Pods project, leaving a dangling reference

Changelog:

[IOS] [FIXED] - Fixes various edge-case failures with the spm deintegrate script

Test Plan:

Tests have been added for each of the described edge-cases. For disclosure: this is mostly an AI PR, I just guided claude through the necessary changes.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 12, 2026
@facebook-github-tools facebook-github-tools Bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Aug 12, 2026
// Run `pod deintegrate` then strip React Native from the Podfile (leaving any
// non-RN pods). Requires CocoaPods on PATH (fail-loud otherwise). Flag-gated ⇒
// no prompt ⇒ CI-safe. Does NOT touch the .xcworkspace.
// no prompt ⇒ CI-safe.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does slightly touch the .xcworkspace to remove the dangling reference :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant