What is the advantage of using CocoaPods?

Many modules can be installed "manually" by simply dragging some files into the project. For me, this seems like a more convenient way to install a container.

If I used CocoaPods, I would have to create a PodFile and execute a bunch of commands, add the structure to the “Related Structures and Libraries” section and rebuild. It seems like a lot of work. However, CocoaPods is the "recommended" way to install containers.

I know that CocoaPods can detect updates for you. But that’s not the way you open Xcode, and a message appears stating that one of your modules is out of date. You manually use the command to check for updates. I mean, the reason you want to install the module is because you want to use one of the functions provided by the module, and you do not want to write it yourself. So updating with new features probably won't do me much good.

And large-scale libraries, such as the AdMob SDK, even remind you that an update is available when the application starts.

Are there other benefits to CocoaPods besides the fact that it detects updates for you?

PS I searched my project several times because of errors in the new version of CocoaPods. This never happens with dragged files ...

+5
source share
1 answer

There are many advantages to using Cocoapod to manually manage dependencies in your project. I list a few of them

  • Lib may refer to another dependency that Cocoapod will take care of. You will have to download each one manually.
  • Lib has certain requirements, such as OS version, import of frameworks, etc. Manually nesting frames was in Objective C . Swift doesn't have one. Then Cocoapod was a beast.
  • An interdependent dependency may not be easy to find for another encoder. Pods ensures that you can go through the container scheme or Podfile to understand what you used.
  • Replacing lib with a new version is a pain manually when you need to delete previous files and add new ones - too many clicks. pod install will do this automatically using a single command.

Besides preserving the initial pod settings in the project, all other steps of adding libraries are simpler than the technical knowledge needed to add Lib manually.

+5
source

All Articles