Repository navigation
fix(react-native): Skip CocoaPods steps for Swift Package Manager projects - #1386
Merged
Merged
Conversation
…jects `react-native spm add --deintegrate` keeps a Podfile that `pod install` cannot parse. The wizard found this Podfile, added `use_modular_headers!` to it, and offered to run `pod install`, which failed. The wizard now finds the SwiftPM autolinking package in the Xcode project and skips these steps. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Replace the #XXXX placeholder with the number of the pull request that adds the entry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
alwx
marked this pull request as ready for review
November 11, 2026 13:00
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.
React Native 0.87+ can link iOS dependencies through Swift Package Manager (SwiftPM) instead of CocoaPods.
react-native spm add --deintegratekeeps thePodfilebut removes the React Native lines from it, so the file is no longer valid Ruby. The wizard still addeduse_modular_headers!to this file and offered to runpod install, which failed.The wizard now looks for the
build/generated/autolinkingpackage that React Native adds to the Xcode project. If it finds the package, it does not change thePodfileand does not offerpod install. The bundle phase and the debug files upload phase are patched as before.I tested this on the React Native 0.88.1 template after I applied React Native's own SwiftPM injection to it. The wizard found SwiftPM, kept all SwiftPM package references in
project.pbxproj, and patched both build phases. Unit tests cover the detection.