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
No answer actually offers a .gitignore
, so here are two flavors.
Checking in the Pods directory (Benefits)
Xcode/iOS friendly git ignore, skipping Mac OS system files, Xcode, builds, other repositories and backups.
.gitignore:
# Mac OS X Finder
.DS_Store
# Private Keys
*.pem
# Xcode legacy
*.mode1
*.mode1v3
*.mode2v3
*.perspective
*.perspectivev3
*.pbxuser
# Xcode
xcuserdata/
project.xcworkspace/
DerivedData/
# build products
build/
*.[oa]
# repositories
.hg
.svn
CVS
# automatic backup files
*~.nib
*.swp
*~
*(Autosaved).rtfd/
Backup[ ]of[ ]*.pages/
Backup[ ]of[ ]*.key/
Backup[ ]of[ ]*.numbers/
Ignoring the Pods directory (Benefits)
.gitignore: (append to previous list)
# Cocoapods
Pods/
Whether or not you check in the Pods directory, the Podfile and Podfile.lock should always be kept under version control.
If Pods
are not checked-in, your Podfile
should probably request explicit version numbers for each Cocoapod. Cocoapods.org discussion here.