Five Simple steps installing COCOA POD Library

Advantages of installing Cocoa Pods over installing the library manually. Sometimes, it’s laborious to induce a particular version of a library. There’s no central place wherever you’ll be able to see that library. Updating library is very difficult.No need to copy and paste, Avoid chances of missing files and resources.

Cocoa Pods dependency managed centrally while in Carthage dependency managed by decentralizing methodology. Cocoa Pods is easy to use and handle. Cocoa Pods creates .xcworkspace file in which all your Pod files are bind together while Carthage uses Xcode builds to build dependencies.

To install CocoaPods in your machine, you have to execute ‘sudo gem install cocoapods’ in Terminal. Not all frameworks and libraries available for Carthage but using cocoa pods you can run all libraries, for example, old objective c libraries.   There are a few simple steps to install Cocoa Pods.

1) Open Terminal.

2) Install Cocoa Pod in Machine by the command of. sudo gem install cocoapods.

3) The define Your project path. cd /your project path

4) To uncover the error which occurs due to Ruby version >= 2.xx .

Install the Active support version. sudo gem install activesupport -v 4.2.6

Note: If there error not found, it means cocoa pods installation is successful.

5) Initialise Pod pod init.

6) Setup the cocoa pods in the master repo. pod setup.

NOTE: Wait for downloading repo. It’s around 360 MB.

7) You can try adding verbose to the command. pod setup –verbose

8) Open Project cocoa Pod file. pod ‘Alamofire’, ‘~> 4.4’

Note: Uncomment platform:ios, ‘8.0’ Uncomment user_frameworks! .if you’re using Swift.

9) After install pods in your project. pod install.

10) Close Project and open again click on ‘yourProjectName xcworkspace’ file.

  Happy Codding. Thanks for reading please share and comment it if you found something useful in this article.  

Leave a Comment