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
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?
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!
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 customsourceline and do something likepod '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!