Carthage - finally a good dependency manager for iOS

iOS   programming   carthage  

I've had to use Cocoapods - I don't like it. I don't like the way it stomps all over your projects files (and the ever-famous merge hell it creates), it's heavy dependency on Ruby, and the way it integrates sub-projects which result in repeated un-necessary builds.

But until now there has been no choice if you don't want to manually manage your projects dependencies. But now there is Carthage - and it represents everything I like:

  • Carthage is de-centralised. That's right, there is no central repository.
  • It builds dependencies as iOS8+ frameworks. Making them dead easy to use.
  • It doesn't mess with your project files. Sure the cost is that once it's built your dependencies, you have to manually include the frameworks. But the impact of that is far smaller and easier to deal with than what Cocoapods does.
  • It only builds your dependencies when you tell it to. From the command line. So clearing Xcode's derived data path doesn't mean you have to rebuild everything all the time.
  • It's git friendly. Admittedly, it still has some work to do in this area. But with a single command I can get Carthage to download dependency source code and created a git submodules file.
  • It's native. At last - no fraking Ruby.
  • It's dead EASY to make your project usable by Carthage. Simply create a share framework target in XCode - Done! No more arcane pod spec rubbish.

Carthage is still vey new and building it's user-base and Carthage friendly projects. But given how easy it is to use, how nicely it plays with Xcode and how easy it is to setup a project for, I see a bright future.


Comments powered by Disqus