Cocoapod 工作区集成

Cocoapod Workspace Integration

目前我正在使用 2 个工作区:第一个工作区包含 MyLibrary pod,由 pod lib create MyLibrary 命令创建。我使用的第二个工作区是我的项目工作区,其中包括我正在处理的项目。

是否可以将 MyLibrary 工作区集成到第二个工作区中?这将非常有帮助,因为我可以在一个工作区中看到我的所有代码。

找到关于此的文档:

Using the files from a local path.

If you wold like to use develop a Pod in tandem with its client project you can use the path option.

pod 'AFNetworking', :path => '~/Documents/AFNetworking'

Using this option CocoaPods will assume the given folder to be the root of the Pod and will link the files directly from there in the Pods project. This means that your edits will persist to CocoaPods installations.

The referenced folder can be a checkout of your your favorite SCM or even a git submodule of the current repo.

Note that the podspec of the Pod file is expected to be in the folder. (http://guides.cocoapods.org/syntax/podfile.html#pod:)

另一个重要提示:

This is awesome for small changes that are made exclusively on existing source files. Adding or removing source files is out of the question because you have no access to the project file. For bigger changes like that, you should open the local project file. (http://www.cocoanetics.com/2014/07/development-pods/)

可以在这里找到很好的示例教程:

http://blog.sigmapoint.pl/developing-static-library-for-ios-with-cocoapods/

尽情享受吧!