IOS Cocoapods Installation and use

Source: Internet
Author: User

We all know that third-party libraries, which generally use cocoapods management, have a great role to play in the development of our iOS cocoapods.

Okay, now look at it. Installation steps: 1. Open terminal, enter

sudo gem install Cocoapods  

Results:

Double using " Mans sudo "  for more information. To proceed, enter your password, or type ctrl-c to abort. Password: (Enter password for this machine)

2. After entering the password, press ENTER to build, wait ...

Results:

' Cocoapods ' 0   is why:unable to download data from https://rubygems.org/-errno::etimedout:operation timed out- Connect (2) (https://rubygems.org/latest_specs.4.8.gz

3. Enter

Gem sources--remove HTTPS//

Press ENTER to build the result:

SOURCE HTTPS//Rubygems.org/not present in cache

4. Enter

Gem sources-a http://

Results:

http://ruby.taobao.org/added to sources

5. Input (remove some unnecessary)

Gem sources--remove https://rubygems.org/

Results:

HTTPS://

6. Enter

Gem Sources-l

Results:

Current SOURCES * * * http://ruby.taobao.org/

7. Enter

Results:

-bash:pod:command not found

8. Re-execution:

sudo gem install Cocoapods

Results

Password: (Enter password for this machine) result; it is a series of data update ... Wait

9. Enter

Results

10. (Search, case-insensitive, write more detailed, find path more precise) input

Pod Search Afnetwork

Result: a bunch of things about (afnetwork) (search results)

11. In this step, we need to build our own project, and then in the terminal input CD (remember the space behind the CD) to drag the project files here. Press ENTER to build

12. Enter

VI Podfile

Press ' I ' into the edit state, here are some of the things you want to edit: (that is, you want to update those third party libraries)

12'reachability','~>3.1.0'  34 platform:ios,'6.0'5'afnetworking  ','~> 2.3.1'

After editing, press ' ESC ' and press ' shift+: ', type Wq (save exit)

13. Update, enter

14. Installation, input

After completing the above steps (the project will be more files), to the project file open. xcworkspace files, you can, need to use, just add the header file is OK.

IOS 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.