博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
CocoaPods是什么?
阅读量:350 次
发布时间:2019-03-04

本文共 820 字,大约阅读时间需要 2 分钟。

读这篇文章了解什么是cocaopods,大体上就是一个依赖管理工具吧

Swift

gem

CocoaPods

cocoaPods是用来管理swift和OC依赖的工具,超过64000个库,被300万app使用。CocoaPods能够让你优雅的管理你的项目。(

CocoaPods is a dependency manager for Swift and Objective-C Cocoa projects. It has over 64 thousand libraries and is used in over 3 million apps. CocoaPods can help you scale your projects elegantly.)

CocoaPods的使用

安装

sudo gem install cocoapods

Get Started

Podfile

platform :ios, '8.0'use_frameworks!target 'MyApp' do  pod 'AFNetworking', '~> 2.6'  pod 'ORStackView', '~> 3.0'  pod 'SwiftyJSON', '~> 2.3'end

pod init

pod install

create a pod

Sometimes CocoaPods doesn’t yet have a pod for one of your dependencies. Fortunately, creating a pod is pretty easy:

$ pod spec create Peanut$ edit Peanut.podspec$ pod spec lint Peanut.podspec

CocoaPods基本使用

查找

pod search json

Podfile.lock是什么


不传图不舒服司机

在这里插入图片描述

转载地址:http://tunr.baihongyu.com/

你可能感兴趣的文章