Mac uses brew to install Cocopods

Source: Internet
Author: User
Tags install homebrew install cocoapods

Cocoapods is a common tool used by iOS to manage third-party class libraries. However, it was found that many articles on the Web were installed directly using Ruby and needed to modify the image. So this article speaks directly about using brew to install Cocoapods.

1, Installation homebrew:

If you have already installed homebrew, you can skip it.

Homebrew is a software package management tool under a Mac system. Can quickly install software that is commonly used under MAC systems

Execute the following command to install homebrew:

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

2. Use Brew to install Cocoapods

Execute the following command:

  Brew Install Cocoapods

  

3. Using Cocoapods

If you can use it, pass it directly.

A. Use the Cocoapods tool for a Xcode project:

Execute command:pod init

    

  

You'll find an extra podfile file.

b, open the podfile. and add a third-party library to the pod import in the Podfile file.

You can also use Vim to quickly edit.

:

 

C. Save the Podfile file after editing is complete:

Execute the following command to install a third-party library:

   Pod Install

    

    

    

  

Mac uses brew to install Cocopods

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.