-
Notifications
You must be signed in to change notification settings - Fork 4
CocoaPods usage notes
CocoaPods is a popular way to manage xCode project dependencies. The followings are couple notes when using it.
-
You can set up internal repo(also called Private Repo), but following the same format as in central repo, and host the spec on internal git repo, say Enterprise Github server. To add a private repo, use command
pod repo add [repo name] [url to the repo in https]
andpod repo remove [repo name]
to remove it. The private repo spec is store under~/.cocoapods/repos
. -
If you have to work on both main project(referred as project M) and a pod project(referred as Project P), you can check out both projects, and then in the Podfile of the main project, you instruct CocoaPods to pull in the dependency of project P from local checkout instead by adding a line
pod '[name of project P]', :path => '[path to project P's local checkout copy]'
, and then runpod update/install
. After these steps, when you open the Project A workspace then you'll see a new group under the Pods project named 'Development Pods'. One of the pods in that group will be Project P. -
A nice tutorial from Use Your Loaf: Creating a CocoaPods. Use
pod spec lint
to make sure the spec contains no warnings and errors. To publish a CocoaPods to trunk service, call:
pod trunk register [email] "[Sunny Wang]"
pod trunk push [libname].podspec