How does CocoaPods work

CocoaPods does a whole lot behind the scenes to make everything you’re talking about work. On a relatively high level the actual ‘Pods’ are managed in a repo that lives on Github here. This is where 3rd party library vendors submit their ‘Pods’ to work with CocoaPods. You’ll notice that if you search for a Pod using the command line tool with pod search AFNetworking you will see all the available Pods matching your search term.

As far as Github vs other sites goes even though the repository full of CocoaPods specifications lives on Github, CocoaPods itself uses just plain old Git to pull down the source from the given repository. Because of this you could make specs from any git repo hosted on any site. We also support svn, mercurial and just plain old http(s). If you’re interested in how the specs work overall you can look at some in the specs repo you can open them from ~/.cocoapods/repos/master on your local machine or edit one directly with pod spec edit AFNetworking from the command line.

Leave a Comment