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!
尝试先运行此命令(它将询问您的管理员密码)
sudo gem install -n /usr/local/bin cocoapods
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".
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
getting errors with this command: sudo gem install cocoapods
brew install cocoapods
=> works for me
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.