Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
timonroe opened this issue Jan 16, 2015 · 14 comments

Comments

@timonroe
Copy link

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.

@kylef
Copy link
Contributor

kylef commented Jan 16, 2015

@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 kylef closed this as completed Jan 16, 2015
@timonroe
Copy link
Author

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

@kylef
Copy link
Contributor

kylef commented Jan 16, 2015

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.

@timonroe
Copy link
Author

@kylef From the Private Pods document...
2. Add your Private Repo to your CocoaPods installation
3. 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.

@timonroe
Copy link
Author

@kylef Please reopen this issue.

@orta
Copy link
Member

orta commented Jan 16, 2015

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.

@timonroe
Copy link
Author

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?

@orta
Copy link
Member

orta commented Jan 16, 2015

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.

@timonroe
Copy link
Author

Thanks @orta... I appreciate the information.

@orta
Copy link
Member

orta commented Jan 16, 2015

👍

@yuldong
Copy link

yuldong commented Apr 12, 2016

@timonroe How did you solve this issue?

@asasdasasd
Copy link

@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

@cameronehrlich
Copy link

@asasdasasd I'm am up against the exact same issue right now. On current and pre... ;(

@asasdasasd
Copy link

@cameronehrlich let me recall that moment, I just remember that error is that I forgot push the new file, maybe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants