Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS Practice for using cocoapod and source control

Tags:

ios

cocoapods

Currently, in our company, we just commit all pods (like AFNetworking, Realm, etc) to svn/git. From time to time, when other developer install pod, update pod, there are conflict.

We also use this so that we don't touch other pods.

pod install --no-repo-update

Can I know what is the good practice for using third party pods? Do I need to commit those pods?

Or just do pod install again after our codes are checked out ? I just want to avoid code conflict for using pods.

like image 455
Khant Thu Linn Avatar asked Mar 10 '26 18:03

Khant Thu Linn


2 Answers

You can refer to http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control

Whether you check in or not, the Pods directory, the Podfile and Podfile.lock should always be kept under version control. It is recommended to keep it under version control and don't add it to your .gitignore

like image 64
user3575114 Avatar answered Mar 12 '26 08:03

user3575114


We also faced the same problem.As a solution, in commit we write only pod file with required pod list . Whenever other person take update, his podfile is updated and then from console he update his project pods.

As pod is same for all so you dont need to commit the pods. for more specific you can you can give pod with version.

like image 23
dahiya_boy Avatar answered Mar 12 '26 06:03

dahiya_boy



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!