0x00: Install Carthage on you mac:
brew install Carthage
0x01: Under your project root directory,
- == 1.0 means using version 1.0
- >= 1.0 means using version 1.0 or higher
- ~> 1.0 means using version 1.0 but lower than version 2.0, i.e. 1.2
0x02: In your project root directory, run:
carthage update --platform iOS
At this stage, it will create:
Cartfile.resolved： This file has the identical content of file
Build： contains the binary frameworks and debug information for each dependency (whether built from scratch or downloaded).
Checkouts： contains your dependencies’ source code.
If you want to update libs, run with any of the following cmd:
carthage update SVProgressHUD --platform iOS carthage update Dollar --platform iOS
--platform iOScmd parameter is optional which build binary framework just for iOS. If it is not specified, it will create binary framework for all platforms.
- Better to gitignore
0x03: Add built framework into the project:
Run Script in the
Under Input Files:
As it is shown in the following image:
build phase is not quite necessary to run the project, but it will avoid the awkward situation that being rejected when submitting to App Store for review.
Use the following cmd to remove those frameworks project information:
In your project, you can import
import SVProgressHUD import Dollar