Advantages of using CocoaPods

A lot of the pods can be installed “manually” by simply dragging some files to the project. To me, this seems like a more convenient way to install a pod.

If I used CocoaPods, I would have to create a PodFile and execute a bunch of commands, add the framework to the “Linked Frameworks and Libraries” section, and rebuild. That seems like a lot of work. Yet CocoaPods is the “recommended” way to install pods. 

I know that CocoaPods can detect updates for you. But it’s not like you open Xcode and a message pops up that says one of your pods is outdated. You have manually use a command to check for updates. I mean, the reason you want to install a pod is because you want to use one of the features provided by the pod and you don’t want to write it yourself. So an update with new features is probably not going to benefit me a lot.

And large-scale libraries like the AdMob SDK, even reminds you that an update is available when you run the app.

As Shubhank Stated https://stackoverflow.com/a/38812353/656600

There are many pros of using Cocoapod over manually managing Dependencies in your project. I list few of them

  • A lib may refer another dependency which Cocoapod will take care itself. Manually you would have to download each one of them. 
  • Lib has certain requirements like OS version, framework imports etc. Manual framework adding were a pain in Objective C.. swift doesn’t have it. Cocoapod were a beast therefore back then. 
  • Manually added dependency might not be easy to find for another coder. Pods ensure that one can go through the pods scheme or Podfile to understand what you have used. 
  • Replacing a lib with new version is a pain manually when you have to delete prev files and add new – too many clicks. pod install will do it automatically using one command.

Also keeping aside the initial setup of pod in a project, all other steps of adding libraries is easier than the technical knowledge required to add a Lib manually.

And from Anita: https://stackoverflow.com/a/53348810/656600

CocoaPods are come up with one command which links to set all your dependencies, one pod file, list all libraries you want to use and just run pod install everything cocoaPods does for you.

No more headache to set the same framework manually as well if updates were there then also cocoa pods managed by them self.

Project sharing/uploading will be easy as all framework are included virtually with one command where previously after adding framework we need to share the whole project with adding up all framework which is added in the App and if some files are not linked or not shared properly – other developers do waste their great amount of time to resolve these error.

Library search path, header path, and framework everything is handled by CocoaPods where previously a developer needs to take care for such things which are consuming and difficult to manage.

Also Just review one file which library used in project instead of check whole framework and search all of them at different places of GitHub.

CocoaPods make developer life easy to install dependencies and make coding with an easy way.

In additions to Shubhank’s and Anita’s answer I am adding some more points from my own experience: https://stackoverflow.com/a/53411399/656600

  • Light Repo: Since it’s recommend that you only commit your code and leave pod to be fetched using pod install each time a new user pulls your code. Cocoa pos make your code folder light. If you ever need to make a change in any pod, it’s always recommend to make a PR request and and update that so other user can be benefited from your amazing work.
  • Dependency: Considering the content of your question I believe you are new to objective-c, swift, development. You’ll love cocoapod if had to actually check the build setting of project and try to set the required header search path and framework search path and not only that you will also need to set flags, lots of those, linker flag, librarian flag if you are trying to use some fat library like XMPP or OpenCV.
  • Centralization: If you need to integrate a feature, which you think is common and many people must have face similar issue. What you do is, got to cocoapod.org and search for the feature. Most of the time you will get a fine library doing similar work which you can integrate and use.
  • Documentation: Cocoapods provide fine detail and that is required to have it integrated also sometimes why is that needed.
  • Removing: Today itself I deleted pubnub and integrated XMPP in my code, which would have been way more tedious and time consuming if I had to do it manually, with taking care of all those search path and flags. 
  • Time: With all above you will save exponentially in your library integration time, which you can use to integrate more beautiful pods which makes your product look beautiful.

For even more details I would like you to see the faq link from the website: https://guides.cocoapods.org/using/faq.html.