IOS Carthage Installation, use

Source: Internet
Author: User

First, the installation and use of Carthage
1. After installing homebrew, enter the following command

" $ (curl-fssl https://raw.githubusercontent.com/Homebrew/install/master/install) "

2. Upgrade Brew

$ Brew Update

3. Use Brew to install


Brew Install Carthage
Carthage version

Second, the use of Carthage

1) Go to the folder where the project is located

$ cd Project Path

2) Create an empty Carthage file

$ Touch Cartfile
$ vim Cartfile

3) Edit the Cartfile file

" Alamofire/alamofire "  "Snapkit/snapkit " "Devxoul/then"

4) Save and close the Cartfile file and use the Cartfile installation framework

$ Carthage Update--platform IOS

5) Open Carthage View the production file directory

$ open Carthage

File Directory Description:
"|| Carthage/checkouts Directory: Source code obtained from GitHub
"|| Carthage/build directory: Compiled framework binary code library

3, about Carthage compiled library is very simple to use, you can manually drag the framework files in the Carthage/build directory into the project:

You can also use scripts to automatically copy the framework to your project each time you compile:

Note: When writing the framework copy path must be written correctly, the default is the project root directory/carthage/build/ios/, there is also need to note that when the AppStore upload, this script will be audited error, it is not recommended to use this method; In addition, in xcode9+ , there will be real-time compilation problems, resulting in system CPU flying, serious energy consumption, use with caution.

4. Other:
Uninstall Carthage:Brew Uninstall Carthage update third-party framework: Update multiple frames: Modify Cartfile file and re-execute Carthage update
Update a FRAME: $ Carthage Update Specific frame name

IOS Carthage Installation, use

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.