Search code examples
xcodecocoaterminalcocoapodspodfile

"pod init" giving error "-bash: pod: command not found"


I am trying to create a Podfile for my Xcode project for Firebase compatibility, but when I try to create it within the same file that my Xcode project is stored in, using my terminal and typing "pod init", it throws the error "-bash: pod: command not found".

I am up to date on OSX as far as I'm aware, using Sierra 10.12.1, but I am unfamiliar with the use of Podfiles, so any help here would be great, thanks.


Solution

  • Looks like you didn't install CocoaPods.

    To do that you install it through ruby gems, like this:

    sudo gem install cocoapods
    

    If you don't have admin privileges, try:

    gem install cocoapods --user-install