Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 906
Jaime Alcántara Arnela Avatar asked Sep 06 '15 11:09

Jaime Alcántara Arnela


2 Answers

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.

like image 125
Joseph Lord Avatar answered Oct 10 '22 04:10

Joseph Lord


Add this into PodFile pod 'Firebase'

Run this command in that file terminal. pod install

Add import file to your .swift import Firebase

like image 40
Leandro Jiao Avatar answered Oct 10 '22 04:10

Leandro Jiao