-
Notifications
You must be signed in to change notification settings - Fork 6
CocoaPods
This page documents the steps required to get your iOS artifact into CocoaPods and CocoaDocs.
The guide to deploying a library and adding additional contributors is here
Sign up for an account and validate email address:
pod trunk register [email]@[address].com 'Your Name' --description='MacBook Pro'
Important note is that you can upload a unique version of a library once. You can not update the same version of a library. You must increase the version number to upload again.
It is recommended to run lint on your podspec before deploying to work out any problems:
Locally:
pod lib lint [name].podspec pod lib lint [name].podspec --verbose pod lib lint [name].podspec --verbose --allow-warnings pod lib lint [name].podspec --verbose --use-libraries --allow-warnings
From released version:
pod spec lint [name].podspec pod spec lint [name].podspec --verbose pod spec lint [name].podspec --verbose --allow-warnings pod spec lint [name].podspec --verbose --use-libraries --allow-warnings
Deploy to trunk:
pod trunk push [name].podspec
or if you have warnings that are OK:
pod trunk push [name].podspec --allow-warnings
or if you need to use static libraries:
pod trunk push [name].podspec --use-libraries --allow-warnings
Add another contributor:
pod trunk add-owner [pod name] [email]@[address].com
CocoaPods and CocoaDocs seem to take their time to process and update things. Sometimes they resolve themselves, sometimes there are problems in your podspec that stop the process, and sometimes you have to request they try again.
This blog post helps a lot in figuring out what is going wrong.
Validate your CocoaDocs appear here and were successful:
http://cocoadocs.org/docsets/[pod]/
Ask CocoaDocs to take another look at your pod:
http://api.cocoadocs.org:4567/redeploy/[pod]/latest
Check for reported errors:
http://api.cocoadocs.org:4567/error/[pod]/[Version]
Check if the metrics are being reported here:
http://metrics.cocoapods.org/api/v1/pods/[pod]
Check if your pod has a page here:
http://cocoapods.org/pods/[pod]
Previewing CocoaDocs locally can help to diagnose problems generating docs.
After you have cocoadocs.org cloned and set up:
bundle exec ./cocoadocs.rb preview [pod] [branch] --verbose
If you want to manually change the podspec and skip retrieving the cocoapods trunk version -
Change your podspec here:
./cocoadocs.org/activity/cocoadocs_specs/Specs/[pod]/[version]/[pod].podspec.json
And run by skipping fetch specs:
bundle exec ./cocoadocs.rb preview [pod] [branch] --verbose --skip-fetch-specs