Cocoapods Installation and use

Source: Internet
Author: User

Cocoapods Installation
Gem Source view gem sources

If there is no https://ruby.taobao.org/, delete the same source and add the https://ruby.taobao.org/Source:
Gem Source--remove existing source (copy and paste, do not fall behind the slash)
Gem Source--add https://ruby.taobao.org/
If successful, the Gem source--add command will prompt "added source ..."
If you want to verify further, you can use gem source again to view

After the gem source has been replaced successfully, install Cocoapods
sudo gem install cocoapods--verbose

Parameter explanation:
Sudo:super do, use System super admin to do one thing
Gem install using the Gem tool for installing a tool
--verbose verbose mode, the installation length if long, will stop in the "terminal" window, and no response, will think that died there. Verbose meaning "wordy", no matter what progress will tell you

After this command is finished, the screen will scroll

Cocoapods use
1 first need to have a project
In the terminal, enter the directory where the project files are located
CD mouse Drag the directory to the terminal

2 Creating a configuration file
Pod init copy and paste the full name of the project file to the terminal

3 Modifying a configuration file
Delete "Platform:ios, ' 9.0 '" before the well number
In the target block, add the name of the third-party library you want to use
Pod ' afnetworking '
Pod ' Sdwebimage '

4 Let Cocoapods configure third-party libraries and projects based on configuration files
Enter terminal
Pod Install--verbose--no-repo-update

Parameter interpretation
--verbose
Verbose mode

--no-repo-update
The repository is not updated until you install

Cocoapods Installation and 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.