为快速框架创建Cocoapod [英] Create Cocoapod for swift framework

查看:49
本文介绍了为快速框架创建Cocoapod的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正计划为使用Swift编写的框架制作Cocoapod,该框架放置在github 此处 。我浏览了Cocoapod文档,但无法解决这个问题。

I am planning to make Cocoapod for my framework written in Swift which is placed on github here. I went through the Cocoapod documentation but I am not able to wrap my head around it.

有人可以解释如何实现它,或指向任何可以解释它的教程。

Could anyone please explain how to achieve it or point to any tutorial that will explain it.

推荐答案

这很简单。开始时,我发现此视频教程非常有用。适用于Objective-C,但对于Swift来说应该差不多。

It's pretty simple. I found this video tutorial incredibly helpful when I started. It's for Objective-C, but should pretty much be the same for Swift.

此外,该视频来自几年前,所以当它告诉您向Cocoapods规格存储库发出拉动请求时,只需忽略它即可。
自该视频发布以来,Cocoapods已停止接受对其规格存储库的拉取请求。现在,您需要运行一个名为 trunk 的命令,该命令实际上可以使Cocoapods自动添加规格。您可以在此处

Also, the video is from a few years back, so when it tells you to 'do a pull request to the Cocoapods specs repo' just ignore it. Since that video came out, Cocoapods has stopped accepting pull requests to their specs repo. Now you need to run a command called trunk which essentially lets Cocoapods add the spec automatically. You can read more about it here

您也可能会发现检查一些Swift Pod规范示例很有帮助,例如 this

You also may find it helpful to check out some examples of Swift pod specs like this

这篇关于为快速框架创建Cocoapod的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆