Neulio
Neulio

Reputation: 332

How do I make a repository for an xcode project with Pods?

Ive been trying to add a Xcode project to a repository on GitHub and it worked however the pods are not within the project and says they are missing. What is the proper way to add a project with the pods to GitHub?

Upvotes: 1

Views: 811

Answers (1)

EarlGrey
EarlGrey

Reputation: 2543

It depends on what your project needs are.

Benefits of checking in the Pods directory

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.

Benefits of ignoring the Pods directory

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

I personally have the following in my .gitignore file:

# CocoaPods
#
Pods/

Upvotes: 1

Related Questions