Cannot Install Cocoapods - No podfile found in the project directory
Steps to add CocoaPods to manage dependencies in your project:
sudo gem install cocoapods
-> This installs CocoaPods as a pieceof software on your machine.Go to the root of your project directory and execute
pod init
->This will add a base Podfile to your project.Add the external dependencies that you have to this Podfile by editing it.
Run
pod install
which will fetch all the external dependenciesmentioned by you, and associate it with a.xcworkspace
file ofyour project. This.xcworkspace
file will be generated for you ifyou already do not have one.
From here on, you should use .xcworkspace
file instead of .xcproject
/ .xcodeproj
.
Example Podfile Syntax:
target 'MyApp' do pod 'AFNetworking', '~> 3.0'end
Where AFNetworking
is the pod and 3.0
is the specific version that I want to install.
Documentation: Using CocoaPods