Installing firebase with Cocoapods

I'm new using cocoapods and I still don't understand it very well. I need to use firebase in my app, but I'm having problems with it. I used this to prepare cocoapods on my mac:

$ sudo gem install cocoapods

And then another time to update it:

$ [sudo] gem install cocoapods

And i didn't had any problem. Now I want to add the firebase library and I don't know how. I go to firebase in the cocoapods page (here it is) and the only thing it says: INSTALLATION:

pod 'Firebase'

When I use this on the terminal it says: [!] Unknown command: Firebase

What am I doing wrong? Maybe I have to download something, don't know.

Thanks for any help.

Upvotes: 5

Views: 6234

Answers (2)

Leandro Jiao
Leandro Jiao

Reputation: 104

Add this into PodFile pod 'Firebase'

Run this command in that file terminal. pod install

Add import file to your .swift import Firebase

Upvotes: 2

Joseph Lord
Joseph Lord

Reputation: 6504

You need to add the pod 'Firebase' line to a file named Podfile at the root of your project. Then you need to run the command: pod install which will read the file and install the listed pods.

Upvotes: 13

Related Questions