Cocoapods: An unexpected version directory `GolfAppDataMgmt.xcdatamodeld` was encountered for the `/Users/timonroe/.cocoapods/repos/DBCourse/DBCourse` Pod in the `DBCourse` repository.

Created on 16 Jan 2015  ยท  14Comments  ยท  Source: CocoaPods/CocoaPods

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

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.

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:

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:

All 14 comments

@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...

  1. Add your Private Repo to your CocoaPods installation
  2. Add your Podspec to your repo
    The Pods need to live somewhere so other people can use them.
    I don't think this is an issue with private pods, I believe it's the pod itself. When another project tries to use this pod by including it into its podfile and running 'pod install', I get the same error.

@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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

evermeer picture evermeer  ยท  3Comments

marzapower picture marzapower  ยท  3Comments

luhui picture luhui  ยท  3Comments

dawnnnnn picture dawnnnnn  ยท  3Comments

spencerkohan picture spencerkohan  ยท  3Comments