IOS cocoapod hands-on steps

Source: Internet
Author: User

1, first open the terminal check under Ruby version Note: Apple is self-containing ruby

Ruby-v View Ruby version

luweiminidemini:~ luweimac_mini$ Ruby-v

Ruby 2.3.3p222 (2016-11-21 revision 56859) [UNIVERSAL.X86_64-DARWIN17]

If you need to update Ruby

Update Ruby

Terminal Enter the following command (point the Ruby image to Taobao, avoid being the wall, you know)

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

Gem Sources-a https://ruby.taobao.org/

Gem sources-l (used to check for successful use of alternate mirror locations)

2, download install Cocoapods If there is no need for the following actions

sudo gem install cocoa pods

I see the gem installed is ready to install.

3, how to use Cocoapods to manage the third party?

Before we develop a project, we need to create a new development project. This step does not require cocoapods.

In the terminal input

CD (Drag the new item into this)

luweiminidemini:~ luweimac_mini$ CD /users/luweimac_mini/desktop/podtest project's root directory

Vim Podfile Create a new configuration file

Format must be as follows this is a high version

Platform:ios, ' 8.0 '

Target ' podtest ' do

Pod ' third party '

End

Then Esc:wq quit.

Pod Install

Pod Update update pod file

Pod Repo update

Select the pod ' third party ' you want to delete
Re-execute the pod install--verbose--no-repo-update command from the terminal CD to the root of the current project

IOS cocoapod hands-on steps

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.