Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Include CocoaPods in version control checkin?

I want to know which files created by CocoaPods in a given iOS project should be checked into version control. What makes most sense to include and ignore? Should I just add the Podfile? Or should I add the entire pods directory?

like image 674
josephap Avatar asked Aug 09 '13 16:08

josephap


People also ask

Should I check the pods directory into source control?

It is recommended that you keep the Pods directory under source control. 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.


1 Answers

This is an ongoing debate even with the CocoaPods core team. https://github.com/CocoaPods/guides.cocoapods.org/issues/3

At some point someone felt that it should be ignored enough to get it into Github's gitignore template for Objective-C.

Some good points were brought up in the linked debate above about longevity of the project where if you check in your pods directory in the future other developers should always be able to build the source regardless of the state of CocoaPods or the specs repository without any dependency on the command line too. But I could see you having this same issues with Git submodules since the remote repositories could be deleted in the future as well. I think this comes down to your preference. Personally I don't like having updates to external dependencies directly in my source control history.

like image 127
Keith Smiley Avatar answered Oct 01 '22 08:10

Keith Smiley