Search code examples
swiftxcodecocoapods

Do I need to type every time : sudo gem install cocoapods


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 ?


Solution

  • 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.