Git Submodules vs. Cocoapods [closed]

醉酒当歌 提交于 2019-12-05 19:42:10

问题


What are the advantages/disadvantages of using Cocoapods vs. Git Submodules? I am aware that there are several differences, but I would like to find out more about the advantages and disadvantages of using either system. Thanks!


回答1:


Git submodules shouldn't be used for dependancy management. I suggest you to use Cocoapods.

Git Submodule

Pros

  • Basically a one liner to initiate it, no need for extra files / configuration.

Cons

  • You can't specify target directories, you always have to clone the whole repository.
  • When the repository moves you have to manually update it.
  • You have to check in the actual dependancies.

Cocoapods

Pros

  • Only clones the directories you need.
  • Easy to update / maintain.
  • You doesn't have to check in the whole dependancy tree, you just need to check in the Podfile and Podfile.lock. Every maintainer can fetch the dependancies on there own.

Cons

  • Depends on the Podfile in your Spec repository or the main spec repository.
  • Depends on an external tool.

You can read more about Cocoapods here.



来源:https://stackoverflow.com/questions/23479083/git-submodules-vs-cocoapods

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!