怎么从CocoaPods到迦太基? [英] How to move from CocoaPods to Carthage?

查看:89
本文介绍了怎么从CocoaPods到迦太基?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的项目已与30个不同的库建立了链接。他们中很少有人支持迦太基。

My project has linked with like 30 different libraries. Very few of them support Carthage.

我是否需要建立分支机构并使其一个一者地支持迦太基?
还有更好的方法吗?

Do I need to make a branch and make them support Carthage one by one? Is there any better way to do so?

推荐答案

迦太基思想是基于框架的。因此,如果您的依赖项不支持它们,那么迦太基将无法为您构建它们。如此简单。

The carthage idea is based on frameworks. So if your dependencies do not support them, carthage is unable to build them for you. Simple as that.

但是:您也可以仅通过使用参数 --no-build来使用迦太基来管理依赖项。然后,迦太基只会将依赖项提取到您的迦太基/结帐文件夹中。

But: You can use carthage also to manage dependencies only by using the param "--no-build". Then carthage will only fetch the dependencies into your Carthage/Checkouts folder.

有一些缺点:


  • 取决于项目,您必须将每个依赖项的项目添加到自己的项目中,如果项目仅包含示例应用程序,则必须自己添加代码

  • 如果项目本身具有依赖项,那么迦太基只能在项目中有cartfile的情况下找到它们,或者,您可以将依赖项目添加到自己的cartfile中,以避免分叉它们,但是您必须自己更新版本

  • 开发人员在工作时会看到代码本身,但他们应该将其视为只读

  • ...

  • depending on the project you have to add the projects of each dependency to your own project, if the projects only contain a sample app you have to add the code itself
  • if the projects have dependencies itself carthage is only able to find them if there is a cartfile in the projects, as an alternative you may add the dependent projects to your own cartfile to avoid forking them but then you have to update the versions for yourself
  • developers see the code itself while work but they should handle them as read-only
  • ...

可以像这样使用迦太基,但我不建议这样做。如果您需要有关此解决方案的更多信息,请在此处

It's possible to use carthage like that, but I wouldn't recommend it. If you need more informations about this solution read here.

注意:如果您分叉项目并使它们支持迦太基,社区可能会感激不尽。 ;-)

Note: If you fork the projects and make them support carthage the community might be grateful. ;-)

这篇关于怎么从CocoaPods到迦太基?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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