什么是“开发包”?在迦太基之下? [英] What's the equivalent of "development pods" under Carthage?
问题描述
为我们的iOS应用开发框架的团队正在从Cocoapods迁移到Carthage。
The teams developing frameworks for our iOS app are migrating from Cocoapods to Carthage.
在Cocoapods下,我可以将依赖项设置为开发包。例如,我可以设置 xyzzy
而不是让主应用下载特定版本的 xyzzy
依赖项。一个开发容器,并将其指向我的本地目录,在该目录中,我已从其Git存储库中检出 xyzzy
。当我在主应用程序的项目中工作时,我对 xyzzy
的文件所做的任何编辑都将在该目录中进行。这样一来,我就可以立即构建和测试更改,当我准备将其检入时,Git会在 xyzzy
项目的目录中找到它们。
Under Cocoapods, I could set up dependencies as "development pods". For example, instead of having the main app download a specific version of an xyzzy
dependency, I could set up xyzzy
as a development pod and point it to my local directory where I had checked out xyzzy
from its Git repo. While I was working in the main app's project, any edits I'd do to xyzzy
's files would be made in that directory. This let me build and test changes immediately, and when I was ready to check them in, Git would find them in the xyzzy
project's directory.
在迦太基下,我还没有找到办法。我看到 http://allocinit.io/ios/debugging-carthage-dependencies/ 其中说明了如何创建符号链接,以便我可以看到依赖项源文件以使调试更加容易,但是我对其进行的所有编辑都在主应用程序的 Carthage / Builds
目录下。
Under Carthage I haven't found a way to do this. I see http://allocinit.io/ios/debugging-carthage-dependencies/ which explains how to create symbolic links so that I can see the dependency source files to make debugging easier, but any edits I make to them are under the main application's Carthage/Builds
directory.
如何在迦太基下设置等效的开发容器?
How do I set up the equivalent of development pods under Carthage?
推荐答案
我相信迦太基还没有类似于开发包的东西。
I believe Carthage doesn't have something similar to "development pods" yet.
但是您可以模拟开发包只需执行以下步骤:
But you could simulate "development pods" just following these steps:
步骤:
- 将.xcodeproj添加到您的工作区中
- 删除您在步骤1中添加的框架项目中的所有依赖项。(可能您可能需要将其从<$ c $中删除) c>构建阶段->运行脚本->输入文件)
- 转到要运行的目标的
常规
选项卡,在链接的框架和库下添加框架
(将使用从.xcoproj添加的一个) - (可选),您可能需要运行
carthage bootstrap 您想在本地的框架存储库中添加code>。
- Add the .xcodeproj to your workspace
- Remove all the dependencies you have in your project of the framework you added in step 1. (probably you may need to remove it from
Build Phases -> Run Script -> Input Files
too ) - Go to
General
tab of the target you want to run, add the framework underLinked Frameworks and Libraries
(it is going to take the one added from the .xcoproj) - (optional) you may need to run
carthage bootstrap
in the framework's repo you want to add locally.
就是这样。
此后,您将可以在同一工作区中运行项目并更新框架的代码。
After that you will be able to run your project and update framework's code in the same workspace.
这篇关于什么是“开发包”?在迦太基之下?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!