Question

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!

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top