0
votes

I tried to add Firebase SDK to my iOS app through CocoaPods.

I followed https://cocoapods.org/pods/Firebase and $pod install gave me this error:

Unable to find a specification for Firebase

I followed some other pages people's suggestions like:

pod update Firebase --verbose

Or changing pod 'Firebase' to pod 'Firebase', '>= 2.3.2' in Podfile.

None of them worked. At the end I gave up and followed Manual Alternative https://www.firebase.com/docs/ios/alternate-setup.html.

I appreciate for help to resolve CocoaPods Method.

2
Have you recently updated to CocoaPods 1.0? Can you go to ~/.cocoapods/repos/master and git pull? If it fails, you should just blow it away and re-clone it, since it's likely that this is CocoaPods being unable to get the specs from GitHub, rather than a problem with Firebase. - Mike McDonald
it seems like google was working on transition from old Firebase SDK to the new one and it was matter of time so "pod install" command works perfectly now - EhsanR
The issue is that CocoaPods gets into a state where specs can't be updated (the git repo they use gets into a broken state), not anything that Firebase controls, nor is it a matter of time to get fixed--it will remain broken unless you directly fix it (by doing the above), or by performing some CocoaPods voodoo magic which fixes it along the way. - Mike McDonald

2 Answers

6
votes

As Mike McDonald said, I had to reset the repo to get it to work. Something I did had deleted all of the modules. I could see that the state was funny by running git status in ~/.cocoapods/repos/master.

This worked for me:

cd ~/.cocoapods/repos/master
git fetch
git reset --hard
0
votes

You need to use pod 'Firebase/core'