. Advertisement .
..3..
. Advertisement .
..4..
I don’t know what I’m doing wrong, but I’ve already lost a couple of days struggling with this. Here is my command line:
sudo gem install cocoapods
pod install
This returns:
No podfile found in the project directory
I don’t have any experience with the “No podfile found in the project directory”. In this case, how should I change?
The cause: The error “No podfile found in the project directory” occurs because you haven’t installed it correctly so it can’t find it.
Solution: Follow these steps to install CocoaPods to monitor dependencies in your program:
sudo gem install cocoapods
pod init
in order to add a base Podfile.pod install
, which will collect all of the external dependencies you specified and associate them with your project’s.xcworkspace
file. If you don’t already have one, this.xcworkspace
file will be created for you.Instead of
.xcproject
/.xcodeproj
, you should use.xcworkspace
from now on.After installing gems, first
pod init
review from GitHub cocoapod description, then add the library to your podfile.Save and run “pod installation”.
It will be added to your project.