Repository navigation
Conversation
No CI job tested the CocoaPods opt-out: after the SwiftPM build, nothing ran `spm deinit` or looked at the files it leaves. The template app job now records the Podfile and ios/.gitignore checksums before `spm add`, runs `spm deinit` after the app upload, and checks that the Podfile and .gitignore are unchanged, the marker and ReactNativeSPM/ are gone, and the Xcode project and shared scheme have no SwiftPM references left. The check reads files only; `deinit` does not run `pod install`.
chrfalch
marked this pull request as ready for review
November 3, 2026 20:33
This branch has not been deployed
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.
Summary
Depends on #59742. This PR is based on that branch and shows only its own commit.
npx react-native spm deinittakes an app from SwiftPM back to CocoaPods. No CI job tests this today. The unit tests mockpodandxcodebuild, and no job runsdeinit. A later change could break the way back without any failing check.This PR adds a file check to the template app build job (
e2e-ios-templateapp.yml, Debug and Release):spm add, the job records the sha256 ofios/Podfileandios/.gitignore, orabsentwhen.gitignoreis missing.npx react-native spm deinit. The uploaded app is not affected..github/workflow-scripts/assert-spm-deinit.shthen checks:.gitignoreis byte-identical, or gone if it was absent before;.spm-injected.jsonmarker andios/ReactNativeSPM/are gone;project.pbxprojhas no SwiftPM package references, product dependencies,ReactNativeSPMpaths, or SwiftPM build phases;The check reads files only.
deinitdoes not runpod install, so the steps take seconds. CocoaPods references are not checked, becausepod installrestores those, notdeinit.Changelog:
[INTERNAL] [ADDED] - CI check that
spm deinittakes the template app back to CocoaPodsTest Plan:
I ran the script locally on copies of
private/helloworld/ioswith a test Podfile:deinit: the script fails with one error for each SwiftPM change still in place.deinitthat I changed to keep the marker, a copy that keeps one.gitignoreline, and a copy that keeps the scheme pre-action: each fails on exactly that check.deinit, with.gitignoreabsent beforeaddand with an existing.gitignore: the script passes, and.gitignoreis byte-identical.bash -npasses on the script, and the workflow YAML parses.Not run: shellcheck (not installed locally), and the job itself. CI on this PR runs it.