We have a private spec repo. One of our private pods has a dependency to another internal pod called CWFoundation (s.dependency 'CWFoundation', '~> 0.0.1'
). The podspec of CWFoundation is only a way of using CWFoundation from jayway (https://github.com/jayway/CWFoundation) as a pod (as it doesn't exist podspec file for it).
Everything was working fine until someone else created a new project in github with the same name, CWFoundation (https://github.com/guojiubo/CWFoundation) and added it to the public repo of cocoapods.
Now our internal pod, when resolves the dependencies, instead of downloading CWFoundation from our private spec repo, downloads the one from the public repo and nothing works.
I read at cocoapods.org that
If you plan on forking a library that is already part of the Master Spec repo, for now we suggest choosing a name that starts with a letter before M
But we're following this rule, the pod is called CWFoundation and starts with 'C' and it doesn't work.
What can I do to retrieve our private podspec file for CWFoundation?
This comment of 'a letter before M' is referring to the name of your private specs repo in ~/.cocoapods/repos
. Since ~/.cocoapods/repos/master
is the default you want something like ~/.cocoapods/repos/alpha
as opposed to ~/.cocoapods/repos/zeta
. As long as this is true it should use the first spec that it finds which will be yours before the one in the master specs repo.
EDIT
Based on the comments to my answer this looks like a bug in CocoaPods. Please submit an issue. In the meantime, just renaming your podspec will fix the issue.