DEV Community

Cover image for CocoaPods freezes on December 2. Here's the SwiftPM migration checklist I'd run first.
Prikshit
Prikshit

Posted on Originally published at Medium

CocoaPods freezes on December 2. Here's the SwiftPM migration checklist I'd run first.

Trunk goes read-only on 2 December 2026. Existing builds keep working, but the pods behind them stop getting updates. Here is how to list yours and plan the move to Swift Package Manager, for native iOS, Flutter and React Native.

Run this in the folder that holds your Podfile.lock. The shell blocks in this post are written for bash.

awk '/^SPEC REPOS:/{s=1;next} /^[A-Z]/{s=0} s && /^  [^ ]/{t=($0 ~ /^  trunk:/)} s && t && /^    - /{sub(/^    - /,"");print}' Podfile.lock
⭐ Football Update: prikshit/cocoapods freezes on december heres the swiftpm migration checklist id run first kfm - Info Live Streaming 2026 ⭐ Football Update: prikshit/cocoapods freezes on december heres the swiftpm migration checklist id run first kfm - Info Live Streaming 2026

Every name it prints is a pod your app pulls from CocoaPods trunk. From Wednesday 2 December 2026, trunk stops accepting new pods and new versions. Your builds won't break that day, but those names are the dependencies that stop getting updates, so this CocoaPods to SwiftPM checklist starts with that list.

It covers native iOS, Flutter and React Native, and it says where each one stands today. Every date and command traces to an official page listed at the end. This is a plan built from those pages, and I haven't run it on a real migration.

What changes on 2 December, and what doesn't

An iced-over CocoaPods Trunk server is marked Read-Only from 2 Dec 2026. A green path labelled Existing builds keep working leads to a phone and a tablet with check marks. A red path labelled New pods or new versions (updates) is blocked. An orange path is labelled Migrate to SwiftPM.

The CocoaPods team's read-only plan puts the permanent switch on 2 December 2026 and says any new podspec will be denied at the server level. It also planned a test run of the same behavior for 2 to 6 November.

Still works after the switch:

  • Existing builds. The same post says the switch won't break builds for people using CocoaPods in 2026 onwards.
  • Installing versions that are already published. Swift.org's November edition says all current pods and versions stay available, in a read-only state.
  • Your own spec repos and fully vendored dependencies. The CocoaPods post says they shouldn't be affected.

Stops working:

  • Publishing a new pod or a new version of one to trunk.
  • Updates to every dependency you get through trunk. In Swift.org's words, pod authors can no longer publish updates.

CocoaPods itself is in maintenance mode too. The team's support plan aims for at least two releases a year to keep up with Xcode, and says there is no plan for new features.

My read is that 2 December starts a clock. The first real problem is a pod that needs a fix for a new Xcode or a security issue and has no way to ship it. The CocoaPods post does say the dates aren't set in stone, but Swift.org and the Flutter docs both quote 2 December, so plan for that date.

Step 1: Inventory your pods

A Podfile.lock page lists four trunk pods, Alamofire, FirebaseCore, SDWebImage and Realm, plus external sources. A terminal running awk prints those names. Each name is checked for Package.swift: yes for Alamofire, FirebaseCore and Realm, and no for SDWebImage. A table records the same results and notes a SwiftPM alternative for SDWebImage.

The command at the top lists trunk pods. If it prints nothing, open Podfile.lock and look under SPEC REPOS. This command only reads the entry named trunk. Pods installed with :git, :path or :podspec show up under EXTERNAL SOURCES in the same file. They don't depend on trunk, but they do depend on CocoaPods, so write them down too.

Next, find out which of those already work with SwiftPM. Swift.org's post says most maintained pods are already SwiftPM compatible, and that the easiest check is the Swift Package Index, since every package in it is a SwiftPM package. Search each name there. To script a first pass, this reads each pod's source repository from its podspec and asks GitHub whether a Package.swift sits in the repository root.

for pod in $(awk '/^SPEC REPOS:/{s=1;next} /^[A-Z]/{s=0} s && /^  [^ ]/{t=($0 ~ /^  trunk:/)} s && t && /^    - /{sub(/^    - /,"");print}' Podfile.lock); do
  repo=$(pod spec cat --regex "^${pod}\$" | jq -r '.source.git // empty' | sed -E 's#\.git$##')
  case "$repo" in
    https://github.com/*)
      raw=$(echo "$repo" | sed 's#https://github.com/#https://raw.githubusercontent.com/#')
      code=$(curl -s -o /dev/null -w '%{http_code}' "$raw/HEAD/Package.swift")
      echo "$pod  $repo  Package.swift: HTTP $code" ;;
    *)
      echo "$pod  ${repo:-no git source}  check by hand" ;;
  esac
done
⭐ Football Update: prikshit/cocoapods freezes on december heres the swiftpm migration checklist id run first kfm - Info Live Streaming 2026 ⭐ Football Update: prikshit/cocoapods freezes on december heres the swiftpm migration checklist id run first kfm - Info Live Streaming 2026

A 200 means the default branch has a manifest, which tells you nothing about releases. Pods hosted outside GitHub, or with a name pod spec cat can't match as a regex, are listed under 'check by hand'. SwiftPM's docs expect a Package.swift in the root of the repository and a tag that is a full semantic version with major, minor and patch numbers, and they warn that a tag like 1.0 isn't recognized, so tag releases as 1.0.0.

Put the result in a file in your repo with one row per pod and a yes or no for Package.swift. For the pods that say no, add a note on whether a SwiftPM alternative exists. The pods with neither are what the last section is for.

Step 2: Native iOS, in Xcode

Infographic titled Native iOS Migration, Move CocoaPods dependencies to SwiftPM in Xcode. Five steps sit beside an Xcode window where File, Add Package Dependency is chosen, then Alamofire is added from GitHub with the Up to Next Major Version rule. A Podfile loses its Alamofire and SnapKit lines, a Package.resolved file lists both versions, and a phone shows the built MyApp.

I haven't run the Xcode or iOS build steps in this post on a Mac. The menu names, flags and commands come from the official docs, starting with Apple's here, and Flutter's and React Native's later on.

  1. Work on a branch. Keep the Podfile and Podfile.lock in version control, as the CocoaPods guide says, so you can go back.
  2. Take one pod from the inventory. In Xcode choose File > Add Package Dependency and paste the package's repository URL. Apple recommends the version requirement, which lets you accept updates up to the next major or minor version. Pick the products you need and add them to your targets. Apple also says to add package dependencies only from authors you trust, and that now applies to every URL you paste.
  3. Delete that pod's line from the Podfile, run pod install, and build. Give each pod its own commit, so a bad move is easy to revert.
  4. Repeat until the Podfile has no pods left. Then run pod deintegrate, which removes all traces of CocoaPods from your Xcode project, and delete the Podfile, the Podfile.lock and the .xcworkspace that CocoaPods created, then open the .xcodeproj.
  5. Commit Package.resolved. Xcode writes it with the exact Git commit each dependency resolves to, and Apple says to commit it so everyone, including CI, builds the same versions.
  6. On CI that calls xcodebuild directly, also pass -disableAutomaticPackageResolution so the build uses Package.resolved as written. For private packages, Apple says to use SSH-based Git URLs and set up known_hosts for the user that runs the job.

Flutter: SwiftPM is already the default

A phone with the Flutter logo sits between an iOS badge and a Mac. Three Package.swift boxes feed into the phone under Swift Package Manager. A CocoaPods fallback box shows a plugin with no Package.swift connecting on a dashed line.

Flutter's docs say that as of the 3.44 release, Flutter uses Swift Package Manager for iOS and macOS native dependencies, that CocoaPods stays supported in maintenance mode, and that the CocoaPods registry becomes read-only on 2 December 2026.

Upgrading and running your app adds the SwiftPM integration for you. Flutter falls back to CocoaPods for any dependency that doesn't support SwiftPM yet. To confirm the integration in Xcode, run the app and check that the Run Prepare Flutter Framework Script pre-action ran and that FlutterGeneratedPluginSwiftPackage is a target dependency.

The Flutter tool decides per plugin by looking for a manifest at ios/<plugin_name>/Package.swift (or the macOS or darwin equivalent), which is the layout the plugin docs describe. This lists which of your plugins have one:

flutter pub get
cd .dart_tool
jq -r '.packages[] | "\(.name)\t\(.rootUri)"' package_config.json | while IFS=$'\t' read -r name uri; do
  dir=$(cd "${uri#file://}" 2>/dev/null && pwd) || continue
  for p in ios macos darwin; do
    if [ -f "$dir/$p/$name/Package.swift" ]; then echo "SwiftPM     $name ($p)"
    elif ls "$dir/$p"/*.podspec >/dev/null 2>&1; then echo "CocoaPods   $name ($p)"
    fi
  done
done
cd ..
⭐ Football Update: prikshit/cocoapods freezes on december heres the swiftpm migration checklist id run first kfm - Info Live Streaming 2026 ⭐ Football Update: prikshit/cocoapods freezes on december heres the swiftpm migration checklist id run first kfm - Info Live Streaming 2026

Don't remove CocoaPods until every plugin in your app reports SwiftPM. The docs say Flutter falls back to CocoaPods if any dependency lacks SwiftPM support, and that edits you made to the Podfile beyond Flutter plugins have to be removed by hand. When you're ready, the docs give these steps:

cd ios
pod deintegrate
cd ..
# delete ios/Podfile, ios/Podfile.lock, ios/Pods/ and ios/.symlinks/ (if present)
# remove any #include lines for Pods/Target Support Files from
# ios/Flutter/Debug.xcconfig and ios/Flutter/Release.xcconfig
flutter clean
flutter pub get
flutter run
⭐ Football Update: prikshit/cocoapods freezes on december heres the swiftpm migration checklist id run first kfm - Info Live Streaming 2026 ⭐ Football Update: prikshit/cocoapods freezes on december heres the swiftpm migration checklist id run first kfm - Info Live Streaming 2026

If a plugin needs a higher iOS version than your app, Xcode reports a Target Integrity error. Raise your Minimum Deployments, then run flutter build ios --config-only to regenerate the configuration.

To turn SwiftPM off, which Flutter says not to do in general, use one of these two. The docs add that disabling it won't be allowed in the future, and that SwiftPM stays integrated in your project when you do.

For every project, as the current user:

flutter config --no-enable-swift-package-manager
⭐ Football Update: prikshit/cocoapods freezes on december heres the swiftpm migration checklist id run first kfm - Info Live Streaming 2026 ⭐ Football Update: prikshit/cocoapods freezes on december heres the swiftpm migration checklist id run first kfm - Info Live Streaming 2026

For one project only, in pubspec.yaml:

# pubspec.yaml, for one project
flutter:
  config:
    enable-swift-package-manager: false
⭐ Football Update: prikshit/cocoapods freezes on december heres the swiftpm migration checklist id run first kfm - Info Live Streaming 2026 ⭐ Football Update: prikshit/cocoapods freezes on december heres the swiftpm migration checklist id run first kfm - Info Live Streaming 2026

To undo the first one, run flutter config --enable-swift-package-manager. Flutter prints a warning each time it runs with SwiftPM off: "Enabling Swift Package Manager will be required in a future version of Flutter."

If you maintain a plugin, the plugin author guide has the full steps. In short, add ios/<plugin_name>/Package.swift with a dependency on FlutterFramework, move your sources under Sources/<plugin_name>, set the pubspec to sdk: ^3.11.0 and flutter: ">=3.41.0", and point the podspec at the new paths. Flutter asks plugins to support both SwiftPM and CocoaPods until further notice, because as of 3.44 a plugin that drops CocoaPods can't be used by projects that haven't migrated.

React Native: experimental, and CocoaPods is still the supported path

A React Native phone leads to an iOS project folder with a Podfile, Podfile.lock and Xcode project. A solid path goes to CocoaPods, marked supported and stable. A dashed path goes to SwiftPM, marked experimental and opt-in. A five-step row says create a branch, test the SwiftPM path, verify the build and features, merge if stable, and roll back if needed.

React Native 0.87, announced on 11 August 2026, added experimental SwiftPM support for iOS. The post says it is opt-in and additive, that CocoaPods remains the default and supported path, and that the commands, flags and generated layout may change. Its last known-limitations line reads "Do not use it in production yet."

React Native 0.88, announced on 19 October 2026, says SwiftPM support remains experimental and opt-in while CocoaPods remains fully supported. It also states the plan: 0.89 targets SwiftPM as the default with an opt-out for apps that are still blocked, and a later release removes CocoaPods support. No date is given for that removal. The open RFC says existing apps should not need to migrate immediately.

So here is what is and isn't true today. The official environment setup page still lists CocoaPods as a requirement, and the existing-app guide still installs React Native with bundle exec pod install. SwiftPM is available behind a command, and React Native itself says not to ship it yet.

In August 2024 the CocoaPods maintainer wrote that for React Native a read-only trunk could be fine as it is, because most of its libraries come through npm and not trunk. React Native's own rn-tester app fits that picture: its Podfile.lock lists two pods under trunk, OCMock and SocketRocket. Your app's lock file settles it for you, so run the command at the top of this post.

The 0.87 post says a community library must ship a Package.swift, and tells you to generate one from the podspec if it doesn't. The RFC adds that a library with its own manifest, in its root or in ios/, is detected automatically. This lists your libraries that have a podspec but no manifest:

for d in node_modules/* node_modules/@*/*; do
  [ -d "$d" ] || continue
  if ls -d "$d"/*.podspec "$d"/ios/*.podspec 2>/dev/null | grep -q .; then
    if [ -f "$d/Package.swift" ] || [ -f "$d/ios/Package.swift" ]; then
      echo "Package.swift   $d"
    else
      echo "podspec only    $d"
    fi
  fi
done
⭐ Football Update: prikshit/cocoapods freezes on december heres the swiftpm migration checklist id run first kfm - Info Live Streaming 2026 ⭐ Football Update: prikshit/cocoapods freezes on december heres the swiftpm migration checklist id run first kfm - Info Live Streaming 2026

The react-native package itself will appear in the list. Ignore it: the core is handled by React Native's own SwiftPM path.

If you want to try the SwiftPM path, do it on a branch. These are the commands from the 0.87 post. Run them from ios/, one at a time, depending on what you need.

To move an app off CocoaPods (removes CocoaPods from the project and injects Swift package references):

cd ios
npx react-native spm --deintegrate
⭐ Football Update: prikshit/cocoapods freezes on december heres the swiftpm migration checklist id run first kfm - Info Live Streaming 2026 ⭐ Football Update: prikshit/cocoapods freezes on december heres the swiftpm migration checklist id run first kfm - Info Live Streaming 2026

To reverse the injection, run npx react-native spm deinit. For a library that only has a podspec, run npx react-native spm scaffold from the app root or from ios/. The file is written into the library's folder in node_modules, so keep it with patch-package until the library ships its own. That command can fail: on async-storage 3.1.1 it stopped with an error that the library mixes Swift and Objective-C, which Swift Package Manager cannot compile in a single target. After a fresh clone and in CI, run npx react-native spm, the analog of pod install.

The 0.87 post says the command injects package references into your existing .xcodeproj and leaves signing, capabilities and build phases alone. To go back to CocoaPods after --deintegrate, the RFC says to restore the Podfile from git and run pod install. One breaking change to check for: React Native headers imported without a namespace need one, so #import <RCTAppDelegate.h> becomes #import <React/RCTAppDelegate.h>.

My position is that most React Native teams should run the inventory this week, try the SwiftPM path on a branch, and keep shipping on CocoaPods until React Native's own docs stop recommending it. Pods already published to trunk keep installing, so nothing forces your hand on 2 December.

Pods that never ship SwiftPM

Some of the names from step 1 will have no Package.swift and no sign of getting one. You have five options, and I'd go in this order.

Replace it. Swift.org suggests searching for an alternative so you don't end up with an unmaintained dependency. If the pod is abandoned anyway, this is the cheapest fix.

Keep it on CocoaPods at the version you have. Podfile.lock pins the exact version, and the CocoaPods guide says pod install keeps installing that version unless you update it. If you need the pod to stop depending on trunk, point the Podfile at a Git tag or a local path. The podspec has to sit in that repository's root or folder.

pod 'SomeLib', :git => 'https://github.com/example/SomeLib.git', :tag => '1.2.3'
pod 'OtherLib', :path => '../vendor/OtherLib'
⭐ Football Update: prikshit/cocoapods freezes on december heres the swiftpm migration checklist id run first kfm - Info Live Streaming 2026 ⭐ Football Update: prikshit/cocoapods freezes on december heres the swiftpm migration checklist id run first kfm - Info Live Streaming 2026

Fork it and add a Package.swift. Put the manifest in the root of your fork and tag a release with a full three-number version, then add the fork's URL in Xcode like any other package. SwiftPM's docs say that is what it expects. A Swift-only pod can be this small. For C or Objective-C sources, SwiftPM's docs say public headers go in a directory commonly named include.

// swift-tools-version:5.9
import PackageDescription

let package = Package(
    name: "SomeLib",
    platforms: [.iOS(.v13)],
    products: [
        .library(name: "SomeLib", targets: ["SomeLib"])
    ],
    targets: [
        .target(
            name: "SomeLib",
            path: "Classes"
        )
    ]
)
⭐ Football Update: prikshit/cocoapods freezes on december heres the swiftpm migration checklist id run first kfm - Info Live Streaming 2026 ⭐ Football Update: prikshit/cocoapods freezes on december heres the swiftpm migration checklist id run first kfm - Info Live Streaming 2026

Use a binary target. If the vendor ships an XCFramework, or you can build one, wrap it in a package. Apple's docs say a binary target has to match the artifact's module name, a hosted one needs a ZIP with the XCFramework in its root plus a checksum, and binary targets only work on Apple platforms.

swift package compute-checksum path/to/SomeLib.zip
⭐ Football Update: prikshit/cocoapods freezes on december heres the swiftpm migration checklist id run first kfm - Info Live Streaming 2026 ⭐ Football Update: prikshit/cocoapods freezes on december heres the swiftpm migration checklist id run first kfm - Info Live Streaming 2026
.binaryTarget(
    name: "SomeLib",
    url: "https://example.com/SomeLib.zip",
    checksum: "3a3cd2b9da90490cba4cc3c73a9e9323445b63f4aef529f4c80e4182190204d5"
)
⭐ Football Update: prikshit/cocoapods freezes on december heres the swiftpm migration checklist id run first kfm - Info Live Streaming 2026 ⭐ Football Update: prikshit/cocoapods freezes on december heres the swiftpm migration checklist id run first kfm - Info Live Streaming 2026

In your own manifest, use the value compute-checksum printed for the ZIP you host. For a framework that lives in your own repository, .binaryTarget(name:path:) takes the path to the XCFramework and needs no checksum.

Vendor it into a local package. Copy the source into a local Swift package in your repo, add a manifest, and add the package to your target. Apple's local packages guide shows File > New > Package, then adding the library product under Frameworks, Libraries, and Embedded Content. Check the license before you copy anything.

If you only have time for one thing before 2 December, run the first command and commit the list with a Package.swift yes or no beside each name.

Sources

Top comments (2)

⭐ Football Update: prikshit/cocoapods freezes on december heres the swiftpm migration checklist id run first kfm - Info Live Streaming 2026
 
userxnom profile image
Abdullah Naseer •

The inventory-first framing is the right call — most teams will discover they have more trunk pods than they think. One gap in step 1: the 200 check looks at the default branch's Package.swift, but a pod can have a manifest on main while its latest release tag predates it, so the check says "yes" and SwiftPM still fails on the version you actually pin. Would it be safer to check the manifest at the pinned tag — the version Podfile.lock already has — instead of the default branch? And on the pods that never ship SwiftPM: "keep it on CocoaPods" pins the version, but after December 2 a security fix in that pod simply never arrives, so that option quietly becomes "fork or replace" the first time a CVE lands. Worth saying that out loud in the checklist?

⭐ Football Update: prikshit/cocoapods freezes on december heres the swiftpm migration checklist id run first kfm - Info Live Streaming 2026
 
prikshit profile image
Prikshit •

Fair catch on step 1. The post does say a 200 on the default branch tells you nothing about releases, but the script stops there, so it still reads as a yes. Checking at the pinned version is easy to add, since the podspec already knows its tag: take the version from the PODS section of Podfile.lock, run pod spec cat --regex "^${pod}\$" --version "$ver" | jq -r '.source.tag' and request raw/$tag/Package.swift instead of HEAD. That also copes with repos that tag v1.2.3 while the pod version is 1.2.3. A 404 there doesn't mean the pod is stuck, only that moving it needs a version bump too, which deserves its own row in the file. On the second point I agree, and I'd say it more bluntly than the post does. Keeping a pod on CocoaPods after 2 December is a bet that it never needs another fix. For anything that touches networking, auth or parsing, I'd plan the fork or the replacement now, while vendoring the latest code is still simple, instead of waiting for the first CVE.