carthage
decentralized dependency manager for Cocoa projects
TLDR
Update and build dependencies
SYNOPSIS
carthage command [options]
DESCRIPTION
carthage is a decentralized dependency manager for Swift and Objective-C Cocoa projects. Unlike CocoaPods, it builds dependencies as binary frameworks without modifying your Xcode project files, workspace, or build settings, leaving full control of the project structure to the developer.
Dependencies are declared in a Cartfile using a simple syntax that supports GitHub repositories, Git URLs, and binary-only frameworks. Running `carthage update` resolves versions, checks out sources, and builds frameworks into the Carthage/Build directory. A Cartfile.resolved lockfile ensures reproducible builds across team members.
Since version 0.37.0, Carthage supports building XCFrameworks, which bundle binaries for multiple platforms and architectures into a single distributable package.
PARAMETERS
--use-xcframeworks
Build as XCFrameworks (recommended)--platform name
Build for specific platform (iOS, macOS, tvOS, watchOS)--no-build
Skip building after checkout--no-use-binaries
Build from source, don't use prebuilt binaries--cache-builds
Cache built frameworks--project-directory path
Directory containing Cartfile--verbose
Show detailed output
CONFIGURATION
Cartfile
Declares project dependencies with version constraints.Cartfile.resolved
Lockfile with exact resolved versions for reproducible builds.Cartfile.private
Dependencies needed only for development and testing.
COMMANDS
update
Update and rebuild dependenciesbootstrap
Build dependencies without updatingbuild
Build specific dependencyoutdated
Check for outdated dependenciesarchive
Create archive of built frameworkscopy-frameworks
Copy frameworks to app bundleversion
Show version
CARTFILE FORMAT
github "realm/realm-swift" == 10.0.0
git "https://example.com/repo.git" "branch-name"
CAVEATS
Supports dynamic frameworks on iOS 8+. Static framework support since version 0.30.0. Consider Swift Package Manager for new projects. Frameworks go to Carthage/Build directory.
SEE ALSO
swift(1), xcodebuild(1), pod(1)
