Free songs

Single blog// see post details

The Importance Of Using Package Managers

Before I got into this field, I hadn’t even heard of package managers. I remember the first time I worked with a professional developer. He was trying to get me up to speed on industry standards with a five minute tutorial. The first (and most important) thing he mentioned was package managers. At the time, I was a full-time iOS developer. The preferred package manager for most iOS developers is known as Cocoapods (http://cocoapods.org).

 

What is a package manager? Commonly, it’s necessary to bring third party libraries into your code. When I started, I had this misplaced hatred for third party libraries. I felt like the code should be my own, from start to finish. However, in the real world, the number one rule of software engineering is “reuse code as often as possible”. In addition, third party code is useful because you’re incorporating the use of a team of developers that spent a great deal of time perfecting, updating, and testing that portion of code. Not only is it put to the test, but it’s also typically supported by the developers. This means that much less code you have to personally support.

 

So, how does it work? Cocoapods is an extremely simple package manager to use. Here are instructions:

  • Save your Podfile.

  • Run $ pod install

  • Open the MyApp.xcworkspace that was created. This should be the file you use everyday to create your app.

  • Create a new project in Xcode as you would normally.

  • Open a terminal window, and $ cd into your project directory.

  • Create a Podfile. This can be done by running $ touch Podfile .

  • Open your Podfile.

  • Add a CocoaPod by specifying pod '$PODNAME' on a single line

  • Save your Podfile.

  • Run $ pod install

  • Open the MyApp.xcworkspace that was created. This should be the file you use everyday to create your app.
  •  
    In summary, package managers are infinitely useful and timesaving. It’s important to keep your packages updated and organized. Remove any that are no longer in use, and keep up with the latest bug fixes.

     

    Leave a Reply

    Your email address will not be published. Required fields are marked *