Top 10 Libraries for iOS Developers in 2017
What are the best iOS developer libraries? Ask 10 colleagues and you’ll get 10 different answers. This article reveals the most popular — by the numbers. By Kishin Manglani.
Sign up/Sign in
With a free Kodeco account you can download source code, track your progress, bookmark, personalise your learner profile and more!
Create accountAlready a member of Kodeco? Sign in
Sign up/Sign in
With a free Kodeco account you can download source code, track your progress, bookmark, personalise your learner profile and more!
Create accountAlready a member of Kodeco? Sign in
Contents
Top 10 Libraries for iOS Developers in 2017
10 mins
It’s no secret that third-party iOS developer libraries can save precious time when you’re developing apps. The iOS open-source community is quite active, and we all know that leveraging libraries is a must when developing an app on your own. Each library offers different tools that you can use to enhance your next iPhone app, including working around some of the most obnoxious constraints of Swift and Objective-C.
So which libraries are the most important to know if you’re an iOS developer? There’s a lot of room for disagreement. That’s why we came up with an unbiased ranking mechanism for iOS libraries.
Selection Criteria
Rating iOS developer libraries is a rather subjective proposition. What makes one library “better” than the next? When libraries solve such a vast range of problems and no two are alike, it’s difficult to make logical comparisons and rank them in order of best to worst.
Fortunately, CocoaPods, a popular Swift and Objective-C dependency manager, collects anonymous stats when users install packages. I scraped its statistics site to find out which open-source packages are most popular right now, rather than polling my colleagues or trying to rate them for myself, and the results are below!
1. AFNetworking
AFNetworking is an Objective-C networking library for iOS, macOS and tvOS. It is a robust library that has been around for many years. From basic networking to advanced features such as Network Reachability and SSL Pinning, AFNetworking has it all. It is one of the most popular iOS libraries of all time with almost 50 million downloads.
2. SDWebImage
SDWebImage is an asynchronous image downloader with caching. It has handy UIKit categories to do things such as set a UIImageView image to an URL. While networking has become a little bit easier in Cocoa over the years, the basic task of setting an image view to an image using an URL hasn’t improved much. SDWebImage helps ease a lot of pain, so that’s why it’s so popular with iOS app developers.
3. Alamofire
Alamofire is AFNetworking’s successor, written in Swift. You might wonder why there are two different networking libraries in the upper echelon of this list, but I assume it’s due to the fact that networking libraries are just extremely useful for iOS app development. The two libraries share a similar feature set, with the main difference being the language in which they are written.
If you are starting a brand new Swift project, my recommendation is to use Alamofire so that your core networking library is consistent with your own source code. Otherwise, both AFNetworking and Alamofire are great options.
4. MBProgressHUD
MBProgressHUD is another useful library that fills a big hole in UIKit. This popular iOS developer library provides a class that displays a heads-up display (HUD) with a spinner, text, or images to show loading, progress, success/failure, or any other alerts to the user. Since iOS has long lacked a native HUD component, I don’t need to tell you how helpful such features are!
5. Masonry
Masonry is a lightweight framework that makes wrestling with AutoLayout much less strenuous by using a simpler syntax. It provides its own chainable DSL that makes AutoLayout code more concise and readable. It also provides several helper methods for common layouts that will shorten over a dozen lines of code with AutoLayout to a single line. For example, if you want to set the edges of a UITableView to the edges of its superview, you can use this: make.edges.equalTo(self);
6. SwiftyJSON
SwiftyJSON improves your life when it comes to handling JSON in Swift. Parsing JSON with Swift can be tricky due to type casting issues that make it difficult to deserialize model object, amd it may require a bunch of nested if
statements. SwiftyJSON makes all of it quite simple to do. It’s also the second-most popular Swift library.
7. SVProgressHUD
SVProgressHud is another HUD library for iOS and tvOS. The API is a bit simpler than MBProgressHUD because it creates a singleton, so you just need to call show
and hide
when using it. You can also customize the HUD with text, an image, or a progress indicator. Again, there is definitely a need for this when developing apps, and it is a useful alternative to MBProgressHUD.
8. MJRefresh
MJRefresh offers you an easy way to add pull-to-refresh functionality to a UITableView. Unfortunately, the standard UIRefreshControl disappoints when it comes to customization options, so MJRefresh is a great stand-in that allows you to add text, an animation or even a UIView. You can also add pull-to-refresh actions in a block or closure, making it even easier to implement than the native UIActivityIndicatorView.
9. CocoaLumberjack
CocoaLumberjack is a simple but powerful logging framework for all your logging needs. If you want to do more than NSLog or print, CocoaLumberjack can help. You can do remote logging, log to a local file, write to multiple loggers, and create different log levels. Ever had to reproduce an elusive bug, or needed to get a better grasp on some user behavior? CocoaLumberjack is very helpful in these cases.
10. Realm
Realm is an enticing, cross-platform alternative to Core Data when it comes to persistence. It’s easier to work with than Core Data, as well as faster, and you even get a data browser to explore Realm database files. In case you need another reason to love Realm, this popular library for iOS app development recently launched a platform to sync data between apps in real-time.
If you need to do any data persistence, I’d definitely recommend checking out Realm as an alternative to Core Data.
We even have a Beginning Realm on iOS video tutorial series to help you get started!
Honorable Mentions
Only two out of the most popular iOS developer libraries are written in Swift! Hard to believe when you’re living, breathing, and eating Swift.
Here are a couple of Swift libraries that didn’t quite make the top 10, according to the data I pulled, but are worthy of your attention.