CocoaPods installation and use details, cocoapods Installation Details

Source: Internet
Author: User
Tags install cocoapods

CocoaPods installation and use details, cocoapods Installation Details
What is CocoaPods?

Many third-party open-source libraries, such as JSONKit and SDWebImage, are frequently used when you develop iOS applications. A class library may use other class libraries. to use it, you must download other class libraries. Other class libraries also use other class libraries ", this may be a special case. In short, I mean it is very troublesome to manually download the required class libraries one by one. Another common situation is that the class libraries used in your project are updated. You must download the new version and add it to the project again, which is very troublesome. If you have any tools to solve these annoying problems, it will be "easy to understand ". So you need CocoaPods.

CocoaPods should be the most commonly used and famous class library management tool for iOS. The two annoying problems mentioned above can be completely solved through cocoaPods with only one line of commands, the premise is that you must set it correctly. Most famous open-source libraries support CocoaPods. Therefore, as iOS programmers, it is essential to master the use of CocoaPods.

 

CocoaPods Installation

Cocoapods Installation Process

1. gem sources -- remove https://rubygems.org/delete previous source

2. gem sources-a https: // ruby: taobao.org/replace the New Source (http is often used on the Internet, which is a previous one. Now https is needed)

3. gem sources-l checks the Current Source

 

4. update and upgrade the gem (if any problem occurs in the future, try this)

Sudo gem update-system

 

5. Install

Sudo gem install cocoapods

The following is a good tutorial (my computer above is not good)

Sudo gem install-n/usr/local/bin cocoapods

 

6. Initialization

Pod setup

This takes a while.

About 5 minutes, maybe faster.

 

To be continued, learn how to use it next time

 

Related Article

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.