0

I have a problem with a private pod when I try to install it from a specific branch. When i include in the podfile:

pod 'private_pod'

everything works ok.

But when I change it to:

pod 'private_pod', :git => 'git_repo', :branch => 'develop'

I get all the times this error: Unable to find a specification for 'private_pod'

Is there anything I can do?

Eric Aya
  • 69,473
  • 35
  • 181
  • 253
nick3389
  • 53
  • 1
  • 9
  • `:git` specifies the URL for the repo. For example, `pod 'MFSideMenu', :git => 'git@github.com:alejandroivan/MFSideMenu.git', :branch => 'master'` – Alejandro Iván Mar 09 '18 at 14:43
  • I have done exactly that as you can see in the description – nick3389 Mar 09 '18 at 15:27
  • Should I assume your repo **does** have a `private_pod.podspec` file correctly defined? And no, I can't "see" what you have done, since your code is not actually verifiable. You're using "placeholders". – Alejandro Iván Mar 09 '18 at 15:29
  • I am just using placeholders as the name of the repo is private of the company I work for. But the syntax is exactly the same. Also, yes the podspec is correctly defined. The curious thing is that if i just write the simple pod 'repo_name' it works ok. I cannot understand why it's not working if I set the branch. – nick3389 Mar 09 '18 at 15:59
  • Forget about `:branch => 'develop'` then. Try first to get the `:git => 'git_repo'` work. You should succeed in getting the last one, the one that is already working when you don't specify git&branch. Does it work? – Larme Mar 09 '18 at 16:03
  • No it's not working. – nick3389 Mar 09 '18 at 16:32
  • I don't understand then how it is working if you write only `pod 'private_pod'`. How is it supposed to know the URLs to fetch? – Larme Mar 10 '18 at 14:07
  • Found it. The pod is a swift framework, so the code is in a different repo. The binary (.framework is in the private pod repo). The podspec was not in binary's repo but in the code's repo. I had of course setup a private spec's repo to expose all my private pods. For some reason, everything I told you were correct, ie with pod 'private_repo' it was working as I included the source of my private spec in the top of the podfile. When I added the podspec in the binary's repo, I managed to install the pod from any branch. So the strange thing is that it was working before with a simple pod command. – nick3389 Mar 14 '18 at 13:30

0 Answers0