I'm trying to create a Private Pod. The folder structure of my pod is:

Running 'pod repo add repo_name source_url' works fine and the repo is installed into ~/.cocoapods/repos/repo_name
Next, I run 'pod repo lint' and get the "An unexpected version directory ....." error.
I did some further testing and any folder name I use for the sub-folder under /DBCourse will cause this error.
@timonroe I think there is some confusion as to what a spec repository is. It's a repository where just spec files are found (example), it doesn't store the source for any of your pods.
You don't necessarily need a spec repository to install a private Pod, inside a Podfile you can reference any Pod by it's source, providing it has a pod spec in the root of the source. For example:
pod 'QueryKit', :git => 'https://github.com/QueryKit/QueryKit'
You can create a spec repository. This is handy when you have more than one private pod, and they may or may not depend on other private pods. It's a repository which stores Podspecs for multiple pods and each individual version. You would have a repository with a file structure which is something like the following:
QueryKit/
โโโ 0.8.0
โย ย โโโ QueryKit.podspec.json
โโโ 0.8.1
โย ย โโโ QueryKit.podspec.json
โโโ 0.8.2
โย ย โโโ QueryKit.podspec.json
โโโ 0.8.3
โโโ QueryKit.podspec.json
URITemplate
โโโ 1.0.0
โย ย โโโ URITemplate.podspec.json
โโโ 1.0.1
โโโ URITemplate.podspec.json
With a private spec repository, you can access your Pods using this in a Podfile. For example using the following:
source 'https://github.com/artsy/Specs'
pod 'Artsy+UILabels'
References:
@kylef I'm creating Pods and then adding them to my CocoaPods installation (eg. /Users/timonroe/.cocoapods/repos/DBCourse ).
The goal here is to create Pods that we can share internally (not on GitHub), as described in the 'Private Pods' link you referenced above (see steps 2. and 3.)
I have this working for several Pods already. The Pod I'm having trouble with is described above and 'pod repo lint' is choking on the sub-folder. It works fine for all of the Pods I have that don't contain a sub-folder.
As I said, you shouldn't be placing source files in a spec repository. A spec repository is a place for only the pod specifications.
@kylef From the Private Pods document...
@kylef Please reopen this issue.
Hey @timonroe - this does not look like an issue with CocoaPods but your understanding of the parts of CocoaPods. A Specs repo is a collection of Podspecs ( see my Specs repo ).
If you want to avoid using git for this, there are plugins for svn and mercurial.
But there are proper places for these questions, and that is stack overflow.
Hey @orta - thanks for the reply. I'm following the steps outlined in this document Private Pods.
If you have a team of people creating pods for internal use only (not stored on GitHub), what approach would you take for setting this up?
An example: You can create a shared folder in dropbox and ln ~/.cocoapods/repos/ ~/DropBox/OurSpecsRepo to that. This can then be like the root folder in here. Or any other folder on a shared server.
There's an implicit expectation that it is a _git_ repo (not a github one) so you could run a git init in that folder and it'd be fine. I mentioned though there is also svn / hg support for these too.
Thanks @orta... I appreciate the information.
:+1:
@timonroe How did you solve this issue?
@orta when I create private pod everthing is OK. I run 'pod spec lint' show "passed validation."
everything seems ok. but after I push my pod .and search my private pod ,I get my trouble described as above
@asasdasasd I'm am up against the exact same issue right now. On current and pre... ;(
@cameronehrlich let me recall that moment, I just remember that error is that I forgot push the new file, maybe.
Most helpful comment
@timonroe I think there is some confusion as to what a spec repository is. It's a repository where just spec files are found (example), it doesn't store the source for any of your pods.
You don't necessarily need a spec repository to install a private Pod, inside a Podfile you can reference any Pod by it's source, providing it has a pod spec in the root of the source. For example:
You can create a spec repository. This is handy when you have more than one private pod, and they may or may not depend on other private pods. It's a repository which stores Podspecs for multiple pods and each individual version. You would have a repository with a file structure which is something like the following:
With a private spec repository, you can access your Pods using this in a Podfile. For example using the following:
References: