• iOS
  • CocoaPods
  • Swift Package Manager
  • dependencies

CocoaPods trunk is set to go read-only on December 2, 2026: find which pods to move to SwiftPM

What the planned CocoaPods trunk read-only switch changes and what it does not, plus a tested script that reads Podfile.lock, finds the pods that come from trunk, and checks whether each one ships a Package.swift.

Suppose your iOS app builds fine today with pod install. A library you use ships a bug fix next spring. You run pod update, and nothing changes: the fix never reaches you. Your build is not broken, it is just frozen.

That is what the CocoaPods maintainers plan for the public pod registry. Orta Therox’s post “CocoaPods Trunk Read-only Plan” (first published in November 2024 and updated in May 2025) says that on December 2, 2026 trunk will “not accept new Podspecs permanently.” CocoaPods Trunk Read-only Plan The Swift project’s November 2026 newsletter repeats the date and suggests moving to Swift Package Manager. What’s new in Swift: November 2026

This article explains what changes, who is affected, and how to sort your own dependencies with a small script before you start migrating.

The words you need

  • CocoaPods: a dependency manager for Apple platforms. You list libraries in a Podfile, run pod install, and it downloads them and wires them into your Xcode workspace.
  • Pod: one library packaged for CocoaPods.
  • Podspec: the file that describes a pod: its name, version, where its source code lives, and how to build it.
  • Trunk: the public publishing service behind pod trunk push. It checks who is publishing and writes accepted podspecs into the public CocoaPods/Specs repository on GitHub, which is served to pod install through a CDN (content delivery network). When a guide says “add pod 'Alamofire'”, the pod comes from trunk.
  • pod trunk push: the command library authors use to publish a new version to trunk.
  • Swift Package Manager (SwiftPM): Apple’s dependency manager, built into Xcode. A library supports it when its repository contains a Package.swift file.
  • Podfile.lock: the file CocoaPods writes after pod install. It records the exact version of every pod and where each one came from.

What changes on December 2 and what does not

The plan is narrow. According to the post:

  1. Publishing stops. New podspecs, meaning new pods and new versions of existing pods, will be denied at the server level, and the CocoaPods/Specs repository will be marked archived on GitHub.
  2. Existing builds keep working. The post says the Specs repo and CDN “would still operate as long as GitHub and jsDelivr continue to exist” and that the switch “will not break builds for people using CocoaPods in 2026 onwards.”
  3. Updates stop arriving. You will not get any more updates to dependencies that come through CocoaPods trunk. That includes bug fixes and security fixes.
  4. Some setups are not affected. The post says the change “shouldn’t affect people who use CocoaPods with their own specs repos, or have all of their dependencies vendored.” My own note: a pod you point at a Git URL or a local path is not fetched from trunk either, although its own dependencies may still be.

The post also says the dates “are not set in stone” and could move later but probably not earlier. It scheduled a test run of rejecting new podspecs for November 2–6, 2026; I could not confirm whether that test ran as scheduled. Treat December 2 as the planned date, not a guarantee.

The reason is security. An earlier post by the same maintainer, from August 2024, says “trunk is the main target in a supply-chain attack,” and that making the Specs repo read-only “would nix all the key issues there.” CocoaPods Support & Maintenance Plans A supply-chain attack is one that compromises a tool or library many projects trust, so the attacker reaches all of them at once. If that idea is new to you, the 1Password November 2026 incident write-up shows how far access to build infrastructure can reach.

What it means for Flutter apps

Flutter apps on iOS and macOS used CocoaPods for the native part of plugins. Flutter’s own documentation says that as of the 3.44 release, Flutter uses SwiftPM for iOS and macOS native dependencies and turns it on by default. It still supports CocoaPods “in maintenance mode” and “falls back to CocoaPods for dependencies that don’t yet support Swift Package Manager.” Swift Package Manager for app developers (Flutter docs source)

So in a Flutter app, the question is the same as in a native app: which of my plugins or extra pods still need trunk?

Step 1: read your Podfile.lock

Open Podfile.lock (in a Flutter app, ios/Podfile.lock). Three sections matter:

  • PODS lists every pod that was installed, including pods that other pods pulled in (transitive dependencies), with exact versions.
  • SPEC REPOS lists which pods came from which spec repository. Names under trunk: come from the public registry. These are the ones affected.
  • EXTERNAL SOURCES lists pods taken from a local :path or a :git URL. These do not depend on trunk.

Here is the example used in the test below, with the DEPENDENCIES section and the checksum lines left out:

PODS:
  - Alamofire (5.9.1)
  - Flutter (1.0.0)
  - GoogleMaps (9.4.0):
    - GoogleMaps/Maps (= 9.4.0)
  - GoogleMaps/Maps (9.4.0)
  - Masonry (1.1.0)
  - MBProgressHUD (1.2.0)
  - MyFork (0.3.0)
  - SDWebImage (5.19.0):
    - SDWebImage/Core (= 5.19.0)
  - SDWebImage/Core (5.19.0)

SPEC REPOS:
  trunk:
    - Alamofire
    - GoogleMaps
    - Masonry
    - MBProgressHUD
    - SDWebImage

EXTERNAL SOURCES:
  Flutter:
    :path: Flutter
  MyFork:
    :git: https://github.com/example/MyFork.git
    :tag: 0.3.0

Reading this by hand works for a handful of pods. For forty pods, a script is faster and does not skip any.

Step 2: run an inventory script

The script below reads Podfile.lock and, for each trunk pod:

  1. looks up the newest version trunk knows about, from the CocoaPods CDN’s version list;
  2. reads that version’s podspec from the CocoaPods/Specs repository to find the library’s Git URL;
  3. checks whether the library’s GitHub repository has a Package.swift on its default branch.

It uses only Ruby’s standard library. Ruby is already present wherever CocoaPods runs, because CocoaPods is a Ruby gem. Save it as pod_inventory.rb next to your Podfile.lock:

# pod_inventory.rb — which pods in Podfile.lock come from CocoaPods trunk,
# and does each one's source repository ship a Package.swift?
# Usage: ruby pod_inventory.rb path/to/Podfile.lock
require 'yaml'
require 'json'
require 'digest'
require 'net/http'
require 'uri'

CDN   = 'https://cdn.cocoapods.org'                                 # version lists
SPECS = 'https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs' # the trunk Specs repo

def get(url, redirects = 3)
  res = Net::HTTP.get_response(URI(url))
  return get(res['location'], redirects - 1) if res.is_a?(Net::HTTPRedirection) && redirects > 0
  res.is_a?(Net::HTTPSuccess) ? res.body : nil
rescue StandardError
  nil
end

# The CDN shards pods by the first three hex digits of md5(name).
def shard(name)
  Digest::MD5.hexdigest(name)[0, 3].chars
end

def latest_version(name)
  body = get("#{CDN}/all_pods_versions_#{shard(name).join('_')}.txt") or return nil
  line = body.lines.find { |l| l.split('/').first == name } or return nil
  line.strip.split('/').drop(1).max_by { |v| Gem::Version.new(v) rescue Gem::Version.new('0') }
end

def git_source(name, version)
  json = get("#{SPECS}/#{shard(name).join('/')}/#{name}/#{version}/#{name}.podspec.json")
  json && JSON.parse(json).dig('source', 'git')
end

def has_package_swift?(git_url)
  m = git_url.to_s.match(%r{github\.com[/:]([^/]+)/([^/]+?)(\.git)?$}) or return 'not on GitHub'
  get("https://raw.githubusercontent.com/#{m[1]}/#{m[2]}/HEAD/Package.swift") ? 'yes' : 'no'
end

lock = YAML.safe_load(File.read(ARGV.fetch(0)), permitted_classes: [Symbol])
locked = lock['PODS'].map { |e| e.is_a?(Hash) ? e.keys.first : e }
                     .to_h { |s| n, v = s.match(/^(\S+) \((.+)\)$/).captures; [n.split('/').first, v] }
trunk = lock.fetch('SPEC REPOS', {}).select { |k, _| k == 'trunk' || k.include?('CocoaPods/Specs') }.values.flatten
external = lock.fetch('EXTERNAL SOURCES', {})

puts 'Pods from trunk (no new versions after the read-only switch):'
trunk.each do |name|
  latest = latest_version(name)
  repo = git_source(name, latest || locked[name])
  puts format('  %-15s locked %-8s latest on trunk %-8s Package.swift: %s',
              name, locked[name], latest || '?', has_package_swift?(repo))
end
puts 'Not from trunk (unaffected by the trunk switch):'
external.each { |name, src| puts format('  %-15s %s', name, src.map { |k, v| "#{k}=#{v}" }.join(' ')) }

A few notes on the code. permitted_classes: [Symbol] is needed because Podfile.lock writes keys such as :path: and :git:, which Ruby’s safe YAML loader rejects by default. Subspecs such as SDWebImage/Core are folded into their parent pod. The script reads public URLs only, sends no credentials, and changes no files.

Run it from a terminal in the folder that holds both files:

ruby pod_inventory.rb Podfile.lock

I ran it on November 29, 2026 with Ruby 3.3.6 on Linux against the example lockfile above. The output was:

Pods from trunk (no new versions after the read-only switch):
  Alamofire       locked 5.9.1    latest on trunk 5.12.2   Package.swift: yes
  GoogleMaps      locked 9.4.0    latest on trunk 10.15.0  Package.swift: not on GitHub
  Masonry         locked 1.1.0    latest on trunk 1.1.0    Package.swift: no
  MBProgressHUD   locked 1.2.0    latest on trunk 1.2.0    Package.swift: yes
  SDWebImage      locked 5.19.0   latest on trunk 5.21.7   Package.swift: yes
Not from trunk (unaffected by the trunk switch):
  Flutter         path=Flutter
  MyFork          git=https://github.com/example/MyFork.git tag=0.3.0

The “latest on trunk” values may differ when you run it, because they come from the live registry. One more caveat: the script treats any failed lookup as missing, so a network error or a GitHub rate limit can also show up as no or not on GitHub. Re-check those rows by hand before deciding.

Step 3: decide per pod

Each row now falls into one of four groups. This decision rule is my recommendation, not something the CocoaPods post prescribes:

What the inventory shows Suggested action
From trunk, Package.swift: yes Move it to SwiftPM. This is the common case (Alamofire, SDWebImage, MBProgressHUD above).
From trunk, Package.swift: no Check whether the project is still maintained. If not, plan a replacement or copy the code into your project (vendoring). Staying on the frozen trunk version keeps working but gets no fixes.
From trunk, not on GitHub Usually a binary SDK from a vendor (GoogleMaps above is distributed as a downloaded archive). Follow that vendor’s own installation docs for SwiftPM.
Not from trunk Not affected by the trunk switch. You can still migrate it later.

Two cautions about the yes column. First, the script checks the default branch, not the exact version you use, so read the library’s release notes before changing versions. Second, a Package.swift file does not promise the same product names or platform support as the podspec. Subspecs in particular often become separate products.

Step 4: migrate one pod at a time

Moving every library in one commit makes failures hard to trace. A safer loop, run in your app’s project folder:

  1. Add the package in Xcode. Apple’s documentation: choose File > Add Package Dependency, enter the repository URL, choose a version rule, then pick the products and targets. Adding package dependencies to your app Prefer “up to next major version” of the version you have, so behavior does not jump.
  2. Remove the same library from the Podfile. Delete its pod '…' line.
  3. Run pod install. CocoaPods removes the pod from the workspace. Expect a “Pod installation complete” message with fewer pods installed, unless another pod still depends on the one you removed.
  4. Build and run the tests. Fix any import lines whose module name changed.
  5. Commit. Include Package.resolved. Apple’s page says Xcode creates this file, which records the exact version of each package, and that you should commit it so everyone uses the same versions. It lives in an xcshareddata/swiftpm/ folder. Apple’s page shows the project (.xcodeproj) case. If you open a .xcworkspace, as CocoaPods projects do, look under the workspace as well.

When the Podfile has no pods left (in a Flutter app: once every plugin supports SwiftPM), remove CocoaPods from the project. Flutter’s guide gives this order for an iOS app: run pod deintegrate in ios/, delete Podfile, Podfile.lock, Pods/ and .symlinks/, remove any #include of CocoaPods .xcconfig files from ios/Flutter/Debug.xcconfig and Release.xcconfig, then run flutter clean, flutter pub get and flutter run. Its warning matters: Flutter falls back to CocoaPods while any plugin lacks SwiftPM support, so check every plugin first.

Stopgap for a pod with no SwiftPM support

If a library you need is still maintained but has no Package.swift, CocoaPods can read the podspec straight from the library’s Git repository instead of trunk. The CocoaPods guides show the form:

pod 'NAME', :git => 'https://example.com/URL/to/repo/NAME.git'

Making a CocoaPod (guides source) This only helps if the maintainer keeps a working podspec in the repository and tags releases. Pin a :tag so builds stay repeatable. It is a bridge, not a destination.

Common mistakes

  • Assuming December 2 breaks builds. By the plan, it does not. The risk is silent staleness, which is worse because nothing fails.
  • Checking only the Podfile. The Podfile lists what you asked for. Podfile.lock also lists what those pods pulled in. Transitive pods appear under trunk: too.
  • Linking a library twice. If a library stays in the Podfile after you add it with SwiftPM, the app may contain two copies, which can cause duplicate-symbol errors or confusing runtime behavior. Remove the pod in the same commit.
  • Deleting Pods/ early. Do it only after pod deintegrate, when no pods remain.

Verify the result

Before relying on the migration:

  1. Re-run the inventory script. The trunk: list should contain only pods you consciously decided to keep.
  2. Do a clean build on a machine or CI runner with empty caches, so nothing is served from an old Pods/ folder.
  3. Open Package.resolved and check that each package resolved to the version you expected.

Conclusion

The December 2 switch, as planned, freezes the public CocoaPods registry rather than shutting it down: existing builds keep working, but trunk pods stop receiving fixes. Run the inventory on your Podfile.lock this week, move every trunk pod that already ships a Package.swift to SwiftPM one at a time, and make an explicit plan for the few that do not.

Written by Duy Pham Independent developer. I build the apps on this site and write about how they work.

More about me