When the cocoa pods has been installed, open the terminal to configure a third party for the specified project

Source: Internet
Author: User
Tags install cocoapods

When you do the project, the use has been very skilled, after a period of time, found that do not know how to get, record down, hope to help everyone.

This is to be configured with the following instructions in case the system has Cocoapods installed.

The use of cocoa pods is more convenient than manual configuration, too much. should be used more.


1. Create a new project and use the CD instruction in the terminal to the folder

$pod Search Third Party

2. New file Vim "Podfile",

$vim Podfile

Write the following and save the tip: (the terminal vim file can be edited by I, ESC exits edit: Wq can be saved exit)

Platform:ios, ' 6.0 '

Pod ' afnetworking ', ' ~> 2.3.1 ' <-------third party

3. Import third-party libraries

$pod Install

4. Exit the terminal

Here are some of the errors I encountered when I installed with the previous installation process

Terminal cocoapods download Bug debug:

Error 1:

Error fetching http://ruby.taobao.org/:

Bad response not Found 404 (http://ruby.taobao.org/specs.4.8.gz)

Solution: Change the installation process $gem sources-a http://ruby.taobao.org/---to----> $gem sources-a https://ruby.taobao.org/

Error 2:

Error:while Executing gem ... (errno::eperm)

Operation not permitted-/usr/bin/pod

Solution: The Apple system upgrade OS X EL Capitan will appear after the plug-in error, will install the process 4. Install Cocoapods (1) sudo gem install cocoapods--> to sudo gem install-n/usr/l Ocal/bin Cocoapods

Error 3:

[!] Unable to satisfy the following requirements:-' Avoscloud (~> 3.1.6.3) ' required by ' podfile '

Specs satisfying the ' Avoscloud (~> 3.1.6.3) ' dependency were found, but they required a higher minimum deployment Targ Et.

Solution: Installation process: Podfile file in Platform:ios, ' 6.0 ' behind the 6.0 is the platform version number, be sure to add

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.