React Native SwiftPM Migration: What Breaks

Summary

Pixel shares a hands-on React Native migration from CocoaPods to Swift Package Manager, testing 12 native libraries in a real app. The announcement details four libraries that moved unchanged, five needing manifest patches, a font-only replacement, and an MMKV downgrade—useful context as CocoaPods trunk and Firebase pod releases wind down.

DEV Community

React Native CocoaPods to Swift Package Manager: what breaks

✍️ Originally published on warrendeleon.com, where I post first. On 2 December 2026 CocoaPods trunk stops accepting new podspecs. Your builds keep working and the pods you already resolve keep resolving. Updates through trunk stop, and that affects only the pods your Podfile.lock lists under trunk:; this app had two, lottie-ios and MMKVCore. The pressure comes from libraries that stop publishing pods, and Firebase is one: its migration page says Firebase 12 is the final major version on CocoaPods and that new versions stop going there in October 2026. All twelve libraries here still ship a podspec at the versions I used. In August, React Native 0.87 added an experimental Swift Package Manager (SwiftPM) path: one command that swaps CocoaPods out of an existing Xcode project. React Native keeps CocoaPods as its default, and the proposal behind the command, RFC (request for comments) #994, gives no date for dropping it and says "Existing applications should not need to migrate immediately". The trunk freeze does not force a migration. Try this path on a branch before you plan one. I ran the command on a finished app, a Pokédex with twelve native libraries chosen to cover eight kinds of iOS dependency between them, and followed it until the app built, launched and passed its test suites again. Four of the twelve moved untouched. Five needed a patched manifest. One stopped being a native module and left its font in the app. The other two, the storage library mmkv and the Nitro Modules it runs on, had to go: mmkv came back one major version older, with a patch of its own. The result is six patches to keep and a downgrade to live with, in exchange for a build that needs no Ruby. Each of the six patches carries something pod install did in Ruby. Three more fixes in them come from SwiftPM's own rules: the name of a URL-declared package, an umbrella-header layout CocoaPods never applied, and a Swift access level one pod had hidden. The command translates a podspec's sources, search paths and simple settings, and writes a prefix header of its own; the patches keep both and carry what it leaves out:

What pod install did, in Ruby

  • Permissions: setup_permissions rewrote the podspec on disk
  • Lottie: s.name = package["name"], computed at install time
  • Screens, permissions, mmkv: install_modules_dependencies injected RCT_NEW_ARCH_ENABLED and the Folly flags
  • Screens: a codegen header_dir made <rnscreens/…> importable
  • Every pod: a generated prefix header
  • svg: a resource bundle carried the Metal kernels

What the patch carries instead

  • Permissions: the handler list, written into the manifest
  • Lottie: swiftpmConfig.name in package.json
  • Screens, permissions, mmkv: the define by hand, and for mmkv the Folly flags
  • Screens: .headerSearchPath for the parent directory
  • Every scaffold: react-native-spm-prefix.h, force-included
  • svg: the kernels excluded; two feComposite operators do nothing

From the first command to a feature-complete build took about 35 minutes and twelve builds, by the timestamps in my migration log; the test suites, the removal of CocoaPods and the clean-build measurements took the rest of the afternoon. The clean Release build came out about 50 seconds faster on one run each, for a cause I have not traced (a second SwiftPM build, from a fresh clone, took 159.2 s against 173.8 s). The app bundle and the binary are smaller, and Ruby is no longer needed on the build machine. Everything here is React Native 0.88.1 on Xcode 26.4...
React Native SwiftPM Migration: What Breaks
Powered by Readybot.io

The latest from Pixel

Incident Response: Look Beyond the Red Alert

Pixel’s DEV Community announcement explores how teams can fixate on one failing service while overlooking the real cause of an outage, such as a full …

Sach: AI Fact-Checks WhatsApp Forwards in India

Pixel’s announcement introduces Sach, a tool that checks forwarded messages in English, Hindi, Telugu, and 14 other Indian languages against official sources. It gives cited …

Java 25 Removes SecurityManager: What to Fix

Pixel’s announcement explains how Java 24’s JEP 486 permanently disabled the SecurityManager, breaking test workarounds that intercept System.exit. It recommends returning exit codes or throwing …