Skip to content

[0.89] Update iOS README steps for Swift Package Manager - #267

Merged
gabrieldonadel merged 1 commit into
0.89-stablefrom
chrfalch/0.89-readme-spm
Dec 2, 2026
Merged

gabrieldonadel merged 1 commit into
0.89-stablefrom
chrfalch/0.89-readme-spm

Conversation

@chrfalch

@chrfalch chrfalch commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

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:

  • New apps: no CocoaPods step. Run npm run ios or yarn ios.
  • If the SPM setup failed during init: run npx react-native spm add --deintegrate.
  • To use CocoaPods: create the app with init --skip-spm, or switch an existing app with npx react-native spm deinit, then bundle install and bundle exec pod install.

How to verify: in an app made by npx @react-native-community/cli@latest init MyApp, run npx react-native spm deinit, then bundle install and cd ios && bundle exec pod install. Each command exits 0, and ios/MyApp.xcworkspace exists.

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, then bundle install and bundle exec pod install: both exit 0.
  • In an SPM app: npx react-native spm deinit (exit 0), then bundle exec pod install (exit 0, 87 pods, .xcworkspace created, no SPM package references left).

Not tested:

  • An Xcode build and app launch after these steps.
  • npx react-native spm update. The line about adding a native library comes from the usage text in react-native/scripts/setup-apple-spm.js. That text says the generated Xcode build phase syncs autolinking, and update refreshes the injection. Please check this line.

Related CLI change: react-native-community/cli#2881.

@gabrieldonadel
gabrieldonadel merged commit 5a0b3c9 into 0.89-stable Dec 2, 2026
1 check passed
@gabrieldonadel
gabrieldonadel deleted the chrfalch/0.89-readme-spm branch December 2, 2026 13:55
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.

3 participants