iOS Development Cocoapods (objective-c third-party library management tools)

Source: Internet
Author: User
Tags install cocoapods

Introduced:

iOS development, in most cases, we need to integrate some third-party dependent libraries, for a slightly larger project, the number of third-party dependent libraries is also very impressive. Cocoapods is a objective-c third-party Library management tool that facilitates the management of third-party libraries.

Usage: 1. Installation

$ sudo gem install Cocoapods

2. Usage

在iOS项目目录下新建PodfileFiles, add third-party dependent libraries, such as

SOURCE ' Https://github.com/CocoaPods/Specs.git ' Platform:ios, ' 8.0 ' pod ' afnetworking ', ' ~> 2.0 ' pod ' aranalytics ', ' ~> 2.7 '


How to find a third-party library, such as I want to find Mknetworkkit, Run command at terminal

Pod Search Mknetworkkit

We can add in the Podfile file

Add directly

Pod ' Mknetworkkit '

Automatically loading the latest library, it is recommended to use a stable version number, if the latest dependent library modification method or instability, your project will not run, unless you need the latest dependent library features.

CD to Podfile directory, run

Pod Install

If you need to update a dependent library, run

Pod Update

3. Running

Under Project directory, open (project name). Xcworkspace

Here, third-party dependent libraries are automatically loaded into the project, good luck!

4. Project submission to Git

Add in a. gitignore file

# podpods/

This ignores the dependency library and streamlines the GIT library. Other people just need to update the dependent library to be local.

Reference:

1. http://cocoapods.org/


iOS Development Cocoapods (objective-c third-party library management tools)

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.