Do I need to type every time I open a new project : sudo gem install cocoapods , to install Cocoapods , or is it a one time thing ? and next time just get the project cd and install pod ?
Asked
Active
Viewed 947 times
-1
-
Only one time, for a new project you just run pod install – Vitalii Shvetsov Sep 28 '20 at 07:27
-
No, `sudo gem install cocoa pods` is to install cocoa pods. To add a pod in new project you have to write `pod init`. It will give you the `pod file` and then you can do `pod install`. – Rob Sep 28 '20 at 07:27
-
It's an "app". Once you installed it (with `gem` which is the "installer tool"), you can call it (with `pod something`) every time you want. It might need an update from time to time too. – Larme Sep 28 '20 at 07:46
-
You can use Swift Package Manager instead of Cocoapods – Cy-4AH Sep 28 '20 at 08:15
-
Most of the pods doesnt support Swift Package Manager , so i wont recommend it . – Eric movchan Sep 28 '20 at 10:25
1 Answers
1
CocoaPods is a dependency manager for Swift and Objective-C Cocoa projects.
If you don't have installed cocoa pods earlier, to install cocoa pods into your machine execute the following command.
sudo gem install cocoa pods
To add the installed dependency manager to your project use the following command.
pod init
.
This will create a file called podfile in your project directory. Include the dependencies in the file appropriately and execute pod install
to install the dependencies.

sachithragt
- 108
- 1
- 6