如何使用Pods为xcode项目创建存储库?

时间:2020-02-27 22:40:33

标签: swift xcode

我一直试图将Xcode项目添加到GitHub上的存储库中,并且可以正常工作,但是pod不在项目中,并表示缺少它们。将带有Pod的项目添加到GitHub的正确方法是什么?

1 个答案:

答案 0 :(得分:0)

这取决于您的项目需求。

在Pods目录中签到的好处

After cloning the repo, the project can immediately build and run, even without having CocoaPods installed on the machine. There is no need to run pod install, and no Internet connection is necessary.
The Pod artifacts (code/libraries) are always available, even if the source of a Pod (e.g. GitHub) were to go down.
The Pod artifacts are guaranteed to be identical to those in the original installation after cloning the repo.

忽略Pods目录的好处

The source control repo will be smaller and take up less space.
As long as the sources (e.g. GitHub) for all Pods are available, CocoaPods is generally able to recreate the same installation. (Technically there is no guarantee that running pod install will fetch and recreate identical artifacts when not using a commit SHA in the Podfile. This is especially true when using zip files in the Podfile.)
There won't be any conflicts to deal with when performing source control operations, such as merging branches with different Pod versions.

Source

我个人的.gitignore文件中包含以下内容:

# CocoaPods
#
Pods/
相关问题