how to run pod install in project directory
Solution 1
Open Terminal.
If you haven't already done so, run this command:
sudo gem install cocoapods
Wait for it to finish before proceeding.
Find the project directory in the Finder. This should be the folder that has the Xcode project in it.
Type
cd
into the terminal, followed by a space.Drag and drop the project directory into the terminal window. It should now say something like this:
cd /Users/someone/Downloads/WonderfulProject
Press return.
Now type
pod install
. Wait for that to finish. It could take a while.
Done!
Solution 2
Close your Xcode project before you carry out the following steps.
- First check if you have cocoapods installed. For this, type
pod --version
into the terminal and if a version no. is returned, you are good to move on to step 3. - If not installed, install cocoapods using the command
sudo gem install cocoapods
in terminal. - Next type
cd
and name of your Xcode project directory - Type
pod init
in terminal. This adds the podfile into your project where you can make edits. - Next type
pod install
.
Now, if a Podfile already exists in your Xcode project folder, for example if the tutorial already added it into the project for you, then you can just carry out step 5, provided you have cd-ed into your Xcode project directory.
Related videos on Youtube
Katie
Updated on July 09, 2022Comments
-
Katie almost 2 years
A tutorial tells me to run
pod install
in the project directory. Can anyone tell me how to do that? -
Katie almost 9 yearsthanks for answering. i get error in step 7. it returns [!] Unable to find a target named
Parse-Sinch
after "Analysing dependencies" @tbodt -
orta almost 9 yearsSounds like you are having problems with understanding what a Podfile should look like, here's the guide on this.
-
tbodt almost 9 yearsCan you link to the tutorial you're using? That would help with context.
-
tbodt almost 9 yearsHmm. I'm getting the exact same error. I'm pretty sure it's a problem with the podfile. But I think it would work if you just skip that step, since there's already a Pods directory that looks correct. Have you tried doing the tutorial without running
pod install
? -
cheznead over 6 yearsYou may need the pod init step before pod install if you don't already have a podfile in your project.
-
Kamal Trivedi about 6 yearspod init helped to create the default file.Thanks for this steps.
-
gianlucaparadise over 3 yearsIn my case
gem
was not working, so I had to runbrew install cocoapods
at step 2