What goes into your .gitignore if you're using CocoaPods?

前端 未结 19 1089
南旧
南旧 2020-11-29 14:47

I\'ve been doing iOS development for a couple of months now and just learned of the promising CocoaPods library for dependency management.

I tried it out on a person

19条回答
  •  夕颜
    夕颜 (楼主)
    2020-11-29 14:51

    At the end is up to you the approach you take.

    This is what Cocoapods team thinks about it:

    Whether or not you check in your Pods folder is up to you, as workflows vary from project to project. We recommend that you keep the Pods directory under source control, and don't add it to your .gitignore. But ultimately this decision is up to you.

    Personally I'd like to keep Pods out, as node_modules if I were using Node or bower_components if I were using Bower. This apply for almost any Dependency Manager out there, and is the philosophy behind git submodules aswell.

    However there are sometimes that you might want to be really sure about the state-of-art of a certain dependency, that way you are carry own the dependency within your project. Of-course there are several drawbacks that apply if you do that, but concerns do not only apply to Cocoapods, those applies to any Dependency Manager out there.

    Below there is a good pros/cons list made by Cocoapods team, and the full text of the quote mentioned previously.

    Cocoapods team: Should I check the Pods directory into source control?

提交回复
热议问题