Repository navigation
[0.89] Update iOS README steps for Swift Package Manager - #267
Merged
Merged
Conversation
cortinico
approved these changes
Dec 2, 2026
gabrieldonadel
approved these changes
Dec 2, 2026
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
Community CLI 21.1 sets up new iOS apps with Swift Package Manager (SPM) instead of CocoaPods. The template README still tells users to run
bundle exec pod install. In an SPM app, that command fails with React Native's SPM error. This PR changes the iOS section of the README:npm run iosoryarn ios.init: runnpx react-native spm add --deintegrate.init --skip-spm, or switch an existing app withnpx react-native spm deinit, thenbundle installandbundle exec pod install.How to verify: in an app made by
npx @react-native-community/cli@latest init MyApp, runnpx react-native spm deinit, thenbundle installandcd ios && bundle exec pod install. Each command exits 0, andios/MyApp.xcworkspaceexists.Details
What I ran on macOS with React Native 0.89 and CLI 21.1:
init(default): the SPM setup finished with no CocoaPods step.init --skip-spm --install-pods false, thenbundle installandbundle exec pod install: both exit 0.npx react-native spm deinit(exit 0), thenbundle exec pod install(exit 0, 87 pods,.xcworkspacecreated, no SPM package references left).Not tested:
npx react-native spm update. The line about adding a native library comes from the usage text inreact-native/scripts/setup-apple-spm.js. That text says the generated Xcode build phase syncs autolinking, andupdaterefreshes the injection. Please check this line.Related CLI change: react-native-community/cli#2881.