Five steps for CocoaPods

Source: Internet
Author: User

1. Installation and upgrade
$ Sudo gem install cocoapods


$ Pod setup


2. Change to the taobao source.


$ Gem sources-r https://rubygems.org/
// Run the following command after the response.
$ Gem sources-a http://ruby.taobao.org/
// View
$ Gem sources-l


3. gem upgrade
Gem is a standard package for managing Ruby libraries and programs. If its version is too low, the installation may fail. The solution is to upgrade gem.
$ Sudo gem update -- system


4. Edit Podfile


Platform: ios
Pod 'reachability ',' ~> 3.0.0'
Pod 'sbjson', '~> 4.0.0'

Platform: ios, '7. 0'
Pod 'afnetworking', '~> 2.0'


5. Import a third-party library


Pod install


Due to speed issues, I don't know how much time is wasted!


The most used pod install and pod update must upgrade the cocoapods spec repository each time. You can skip this step by adding parameters during command execution. The details are as follows:
Pod install -- verbose -- no-repo-update
Pod update -- verbose -- no-repo-update

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.