This screencast was authored by Sam Soffes.
Why use Carthage?
CocoaPods’ approach is easier to use, while Carthage’s is flexible and unintrusive.
The goal of CocoaPods is listed in its README as follows:
"… to improve discoverability of, and engagement in, third party open-source libraries, by creating a more centralized ecosystem"
By contrast, Carthage has been created as a decentralized dependency manager.
- Carthage is decentralized
- Carthage doesn't mess with your project
- Carthage has great support for modules since everything is a framework
- Carthage works super well with Swift
- iOS 8+ is required since Carthage builds frameworks
- Libraries must have a framework target to use Carthage
- Easily install with Homebrew
Integrating a Library into Your Project
carthage update - Update and rebuild the project's dependencies
carthage bootstrap — Check out and build the project's dependencies
- Add frameworks to your project
- Add "Run Script" build phase
- Add Carthage to "Framework Search Paths"