A simple, decentralized dependency manager for Cocoa.
Carthage is a decentralized dependency manager, intended to be the simplest way to add frameworks to Cocoa (iOS and macOS) applications. A few of my GitHub teammates and I started Carthage in late 2014 to fill a gap in the Cocoa ecosystem, and to make it easier to reuse and update code across multiple projects.
At the time, we were managing all of our dependencies (including our long list of open source libraries) by hand using Git submodules. Although this was functional, it involved a lot of Shit Work™ and manual synchronization across projects. We were averse to using CocoaPods because of its entirely separate toolchain (Ruby), and the fairly invasive “magic” it utilized to create project structures on your behalf—which we reasoned would make any failures more confusing and harder to debug.
In my 2015 talk, “Ruthlessly Simple Dependency Management with Carthage,” I walk through the problems we were trying to solve when we created Carthage, then share a quick primer on how to use it. I also explain why ruthless simplicity was so important to us in the design of Carthage, and dive a little bit into how it works under the hood (including the “decentralized” dependency resolution algorithm).
With Carthage, we had created a tool that simply orchestrated Git and Apple’s Xcode into doing what they do best, minimizing Shit Work™ for the developer, but otherwise leaving things as simple and transparent as possible. We refer to it as a decentralized dependency manager because there is no central package repository, and versions are simply represented as tags in Git repositories; dependencies can be pulled from anywhere with no prior registration needed. This made it extremely simple to include open source libraries and frameworks—even those that hadn’t been explicitly set up for Carthage.
I stopped working on Carthage when I joined Facebook, as I would no longer be using it day-to-day, and have always felt that the best open source maintainers should be dogfooding their work constantly. An amazing team of community contributors took over maintenance of Carthage, and are still continuously releasing updates now.
I’m proud of the impact that Carthage has had on the Cocoa community, and how much it has simplified using open source libraries and frameworks. Its influence can be felt in the more recent, official Swift Package Manager as well!