I have been struggling with a similar issue for days now and it turned out that the pod that I was trying to include as a dependency is not a valid Repo for CocoaPods I mean the repo is a correct GitHub repo but the problem with it is that it only has a podspec
in the root of the project and is missing the CocoaPods specs repo structure.
If you read the CocoaPods official guide it might not become obvious what they mean but once I started looking through a specs repo it just clicked.
If you check the example they have given then you will see that you need a different GitHub repo separate from your pod's repo with all the podspecs listed in it. Have a look at their example repo Artsy
You can see what I mean.
What I had as a misconception was adding the source of the single pod at the top of my Podfile, but rather it would have to be the source of a whole specs repo which has to be created separately as I mentioned above otherwise pod install won't be able to find the subspecs as the repo is incorrect.
After the explanation and looking into the Artsy repo I mentioned above I hope that re-reading the CocoaPods doc will make much more sense as it did to me :)
I hope this helps.
I try to give an example of how the Podfile should look like with the correct source:
# The source below won't work if you integrate it as a dependency
source 'https://github.com/iDevelopper/PBRevealViewController.git'
# Instead create a new specs repo as per the info above and include that
# Similar to the one you already have here
source 'https://github.com/iDevelopper/RWPodSpecs.git'
#use_frameworks!
platform :ios, '9.0'
workspace 'PBRevealViewController.xcworkspace'
target 'PBRevealViewController_Example' do
pod 'PBRevealViewController'
end