CocoaPods 1.1.1 Issue ? [!] An unexpected version directory `NewClass` was encountered for the `/Users/apple/.cocoapods/repos/MoudlePod3/MoudlePod3` Pod in the `MoudlePod3` repository.

Created on 27 Oct 2016  ยท  1Comment  ยท  Source: CocoaPods/CocoaPods

I try to create a private pod.

Environment:
Xcode 8
Cocoapods 1.1.1

My pods file tree:
.
โ”œโ”€โ”€ LICENSE
โ”œโ”€โ”€ MoudlePod3
โ”‚ย ย  โ”œโ”€โ”€ 0.0.1
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ MoudlePod3.podspec
โ”‚ย ย  โ”œโ”€โ”€ TestObject3.h
โ”‚ย ย  โ””โ”€โ”€ TestObject3.m
โ”œโ”€โ”€ MoudlePod3.podspec
โ””โ”€โ”€ README.md

PodSepc(0.0.1):
XXXX
s.source_files = "MoudlePod3/*.{h,m}"
XXX

Demo Project Pod file:
source 'https://github.com/CocoaPods/Specs.git'
source 'http://192.168.1.71/ljb/MoudlePod3.git'

target 'MoudleApp' do
pod 'MoudlePod3', '~> 0.0.1'
end

run pod install

Everything is perfect!


Then I add some new folder and files to the pod

My pods file tree:
.
โ”œโ”€โ”€ LICENSE
โ”œโ”€โ”€ MoudlePod3
โ”‚ย ย  โ”œโ”€โ”€ 0.0.1
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ MoudlePod3.podspec
โ”‚ย ย  โ”œโ”€โ”€ 0.0.4
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ MoudlePod3.podspec
โ”‚ย ย  โ”œโ”€โ”€ NewClass
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ TestObjectNew.h
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ TestObjectNew.m
โ”‚ย ย  โ”œโ”€โ”€ TestObject3.h
โ”‚ย ย  โ””โ”€โ”€ TestObject3.m
โ”œโ”€โ”€ MoudlePod3.podspec
โ””โ”€โ”€ README.md

PodSepc(0.0.4):
XXXX
s.source_files = "MoudlePod3/_.{h,m}", "MoudlePod2/NewClass/_.{h,m}"
XXX

Demo Project Pod file:
source 'https://github.com/CocoaPods/Specs.git'
source 'http://192.168.1.71/ljb/MoudlePod3.git'

target 'MoudleApp' do
pod 'MoudlePod3', '~> 0.0.4'
end

run pod install

[!] An unexpected version directory NewClass was encountered for the /Users/apple/.cocoapods/repos/MoudlePod3/MoudlePod3 Pod in the MoudlePod3 repository.

Why the error happened? I just add a folder to the pod...
Is this the cocoapods' issue?

Most helpful comment

Ah, so source 'http://192.168.1.71/ljb/MoudlePod3.git' means that it expects that to be a specs repo, but it looks like you're trying to combine a specs repo and the repo where you keep the code for your pod, which is unsupported. You should instead remove the custom source line and do something like pod 'MoudlePod3', '~> 0.0.4', :git => '<repo_url>'. Checkout https://guides.cocoapods.org/using/the-podfile.html#from-a-podspec-in-the-root-of-a-library-repo for more info.

Going to close this, since I believe the guides should contain all of the information you need to clear up your pods setup. Thanks for filing!

>All comments

Ah, so source 'http://192.168.1.71/ljb/MoudlePod3.git' means that it expects that to be a specs repo, but it looks like you're trying to combine a specs repo and the repo where you keep the code for your pod, which is unsupported. You should instead remove the custom source line and do something like pod 'MoudlePod3', '~> 0.0.4', :git => '<repo_url>'. Checkout https://guides.cocoapods.org/using/the-podfile.html#from-a-podspec-in-the-root-of-a-library-repo for more info.

Going to close this, since I believe the guides should contain all of the information you need to clear up your pods setup. Thanks for filing!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gerchicov-bp picture gerchicov-bp  ยท  3Comments

evermeer picture evermeer  ยท  3Comments

Curtis-Halbrook picture Curtis-Halbrook  ยท  3Comments

Mingmingmew picture Mingmingmew  ยท  3Comments

hmistry picture hmistry  ยท  3Comments