Getting Carthage 4 https://github.com/Carthage/Carthage/releases (pre-built) or 4 brew update && brew install carthage 4 You may need to tweak xcode-select
What Does it do? 4 Takes a list of dependencies, that may have their own dependencies 4 Resolves versions 4 Fetches the dependencies 4 builds them with their own project settings
Normal Semantic versioning 4 >= 1.0 for “at least version 1.0” 4 ~> 1.0 for “compatible with version 1.0” 4 == 1.0 for “exactly version 1.0” 4 “some-branch-or-tag-or-commit” for a specific Git object (anything allowed by git rev-parse)
Cartfile.private Same format as the Cartfile. Dependencies that your project needs that aren’t necessary for it to be used. These are not shared upstream. For example; things you need for testing.
carthage help update [--configuration Release] the Xcode configuration to build (ignored if --no-build option is present) [--platform all] the platform to build for (ignored if --no-build option is present) [--verbose] print xcodebuild output inline (ignored if --no-build option is present) [--no-build] skip the building of dependencies after updating [--use-ssh] use SSH for downloading GitHub repositories [--use-submodules] add dependencies as Git submodules [--no-use-binaries] check out dependency repositories even when prebuilt frameworks exist (ignored if --no-build option is present) [--color auto] whether to apply color and terminal formatting (one of ‘auto’, ‘always’, or ‘never’)
Writing modules 4 Share your build schemes 4 When writing a Foundation module, create a separate target for iOS and Mac (takes some tweaking, but it can be done).
When things go wrong Because they will! - Check what compiler you are using with xcode-select -p - fix your build with carthage build --no-skip-current, build the scheme to see more detailed errors. - Blitz Carthage folder and Cartfile.resolved - Blitz the cache at ~/Library/Caches/carthage - Bitcode!
When it all goes completely wrong! Because it will! - Change the Carthage update method to use submodules and not build. - Remove the linked frameworks. - Drag the dependency project files into your project and build it “old school”.