0

I am taking a course from Udemy for iOS 10 (swift 3) programming. An app works with Firebase and Firebase requires a pod file. In the course, it said to type the following commands in Terminal to install a pod:

          cd Desktop/
          ln
          cd dc-social
          ln
          pod init

But when I run the pod init command, it gives me an error:

      -bash: pod: command not found

I am running macOS Sierra (the final release). What should I do? Any help would be appreciated :) Thanks!

Eric Aya
  • 69,473
  • 35
  • 181
  • 253
ojassethi
  • 379
  • 1
  • 5
  • 16
  • 1
    Perhaps need to install https://cocoapods.org/app – cloud1 Oct 06 '16 at 16:14
  • @cloud1 thanks for helping but it still isn't working. I try to install the command line interface but CocoaPods asks me for my password but it doesn't install it for some reason. Can you help me here? – ojassethi Oct 07 '16 at 04:45
  • I have taken the same course and have the same problem. Someone please help! – Rishi Nov 01 '16 at 14:51
  • I had the same problem, you need to install cocoapods into your project directory. Check this link, this could solve my problem: https://www.youtube.com/watch?v=nXLyB9NVouk – Ghasem Tabatabaei Aug 05 '17 at 22:23

4 Answers4

7

try to run this first (it will ask your admin password)

sudo gem install -n /usr/local/bin cocoapods
Almazini
  • 1,825
  • 4
  • 25
  • 48
3

In my case I was unable to install with gem (sudo gem install cocoapods) but successfully installed with homebrew:

brew install cocoapods
2e0byo
  • 5,305
  • 1
  • 6
  • 26
Hammad Siraj
  • 91
  • 1
  • 6
0

I am in the same course and got the same problem. I found out that we have to install cocapods before we run that command. So do the following in your terminal (it will ask for your password):

sudo gem install cocoapods

This will install some stuff and then you will be able to run the "init pod command".

HebeleHododo
  • 3,620
  • 1
  • 29
  • 38
0

Maybe a little late, but often you can't do a sudo when your not an admin. Then do this, open the terminal. Change to an admin user with

su 'theadminName'

Type the admin password. Then do

sudo gem install cocoapods
iPadawan
  • 898
  • 1
  • 12
  • 23