CocoaPods Is Stepping Back — Time to Adapt
If you’ve been in the iOS dev game for a while, you’ve probably relied on CocoaPods for managing dependencies. It’s been a solid tool for years, but things are changing. With CocoaPods trunk now read-only starting in 2026, it’s time to talk about what this means for us and how to make a smooth transition to Swift Package Manager (SPM).
The CocoaPods SituationPermalink
Since its launch in 2011, CocoaPods has been the go-to dependency manager for iOS developers. That simple pod install command became second nature, and the Podfile felt like an old friend.
But according to the CocoaPods blog, the CocoaPods trunk repository will become read-only after 2026, which means:
-
No new pods can be published.
-
Existing pods can’t be updated.
-
Current versions will still be accessible (for now).
This shift isn’t exactly shocking. Ever since Apple introduced SPM in 2015, it’s been slowly but surely improving. And with Apple’s full backing and seamless integration into Xcode, the writing was on the wall.
Why SPM is the Way ForwardPermalink
The good news? SPM has grown into a strong replacement for CocoaPods. Here’s why making the switch makes sense:
Perks of SPM:
- Built into Xcode – No extra setup or tools needed.
- Faster builds – Less overhead compared to CocoaPods.
- Cleaner project structure – No extra workspace files.
- Official Apple support – It’s here to stay.
- Modern architecture – Designed with Swift in mind.
Steps to Migrate:
Switching from CocoaPods to SPM is pretty straightforward:
- List Your Dependencies – Note all the pods your project uses.
- Check SPM Support – Most popular libraries now support SPM.
- Add Packages in Xcode – Head to File → Add Packages and enter the repo URL.
- Update Your Code – Usually, this step is minimal.
- Ditch CocoaPods – Once everything works, remove the Podfile and run pod deintegrate.
Here’s how your dependency declaration changes:
// Old CocoaPods Podfile
pod 'Alamofire', '~> 5.10'
// New SPM Package.swift (or via Xcode UI)
.package(url: "https://github.com/Alamofire/Alamofire.git"
Keeping Your Dependencies in CheckPermalink
With CocoaPods on its way out, staying on top of dependencies requires a little more effort:
- Follow GitHub Repos – Keep an eye on library updates.
- Use Dependabot – Automate dependency monitoring.
- Look for Community Forks – Some devs might have already converted libraries to SPM.
- Audit Dependencies Regularly – Make SPM migration a routine check.
Wrapping UpPermalink
Switching from CocoaPods to SPM is a significant shift, but it’s ultimately a move in the right direction. SPM is simpler, more streamlined, and integrates seamlessly with Xcode, making project maintenance easier.
That said, I have a deep appreciation for the CocoaPods team for building such a great dependency manager—one that I’ve relied on for over a decade. While it’s not being phased out, I see it continuing to evolve, and I fully support that.
For those new to iOS development, there’s no need to stress about adopting SPM from the start—it’s a smooth transition.
Happy reading!
Like what you're reading?
If this article hit the spot, why not subscribe to the weekly newsletter?
Every weekend, you'll get a short and sweet summary of the latest posts and tips—free and easy, no strings
attached!
You can unsubscribe anytime.