xcode swift_CocoaPods Swift XCode教程

xcode swift

As a beginner or seasoned iOS Developer, at some point in time, you must have come across CocoaPods. It’s one of the most important concepts to master in iOS Developer and in this tutorial we’ll be doing just the same.

作为初学者或经验丰富的iOS开发人员,在某些时候,您一定遇到过CocoaPods。 这是在iOS Developer中掌握的最重要的概念之一,在本教程中,我们将做同样的事情。

可可豆 (CocoaPods)

CocoaPods are dependency manager for your XCode projects.

CocoaPods是XCode项目的依赖项管理器。

Dependency Managers are responsible for managing libraries and frameworks added to your project. Instead of you downloading the libraries manually and adding it to the project, they do it for you.

依赖性管理器负责管理添加到项目中的库和框架。 他们无需手动下载库并将其添加到项目中,而是为您完成。

CocoaPods itself is a library that’s written in Ruby. It holds a central repository of all the third party libraries.

CocoaPods本身是一个用Ruby编写的库。 它拥有所有第三方库的中央存储库。

You can always search in the repository for the third party pod name and version.

您始终可以在存储库中搜索第三方Pod名称和版本。

什么是豆荚? (What is a Pod?)

A Pod is a single library or framework that’s added to our project.

Pod是添加到我们项目中的单个库或框架。

So where are these libraries installed and stored for the XCode Project?

那么,这些库在哪里为XCode项目安装和存储?

There’s a file Podfile in which we store our Pods and their versions.

有一个文件Podfile,我们在其中存储Pod及其版本。

Let’s first install CocoaPods on our mac through the terminal.

首先让我们通过终端在Mac上安装CocoaPods。

安装CocoaPods (Install CocoaPods)

Run the command – sudo gem install cocoapods

install cocoapods

运行命令– sudo gem install cocoapods

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值