Top 10 Most Useful iOS Libraries to Know and Love

Marcelo Fabri Marcelo Fabri

The winner’s plaque

This is a post by iOS Tutorial Team Member Marcelo Fabri, an iOS developer working at Movile. Check out his personal website or find him on Twitter or on .

A while back, you guys voted for your favorite iOS libraries. At long last, it’s time to know the winners!

And to make it fun, the top “Reader’s Choice” library winner wins an engraved plaque from all of us to thank them for writing such a popular library!

In addition to the “Reader’s Choice” winner from your votes, we also made a private vote from the iOS Tutorial Team. We also asked some guest stars to chime in with their thoughts. It was a lot more fun that choosing all by myself! :]

Keep reading to find out how the system works, and who the winning libraries were!

How It Works

We have three voting entities: the readers, the iOS Tutorial Team and the guest stars. Each one of them was asked to decide the best five libraries, following these rules:

  • One cannot vote for his own library.
  • Large frameworks, like the gaming ones (e.g. cocos2d) are out.
  • Libraries that don’t run on the device, such as CocoaPods or Rack::CoreData, weren’t included.
  • In case of draws, we preferred libraries that provides functionality that iOS doesn’t offer yet. This is important, because a lot of libraries were written some time ago, when some functionality (e.g. JSON parsing) weren’t included on iOS.

Each guest star nomination counted as one point (they could nominate five libraries), and we distributed the readers and tutorial team points by the position the library was at the pool. The first one got five points, the second, four points, and so on… until the fifth, which got one vote.

The guest team were composed by the following developers (sorted alphabetically):

Each one of them has got his own badge, thanks kindly to Ray’s wife Vicki! They’ll be used to identify the guest votes on each library.

Bill’s badge

Evan’s badge

Jeff’s badge

Mattt’s badge

Peter’s badge

Sam’s badge

I also would like to thank Loren Brichter (creator of Tweetie – which Twitter has bought – and creator the “pull to refresh” pattern) and Erica Sadun (author of some books, especially The iPhone Developer’s Cookbook). They were asked to help us, but both of them said they prefer doing their own stuff – which some people mentioned, and we’ll discuss it later!

We’ve also got some more badges!

Reader’s Choice Position

iOS Tutorial Team Position

Overall Position

It’s time to know our winners!

Honorable Mentions

Not every library nominated by our guest voters made to the Top 10, but they deserve a mention, don’t they? Here are they (alphabetically sorted):


CocoaLumberjack

“Highly configurable logging framework” – Evan Doll
It’s faster than NSLog, and as easy to use.


CorePlot

Core Plot provides 2D visualization of data, creating a lot of graphs types, such as pizza ones, bar ones, and a lot more. We even have an awesome tutorial on the site!


DCIntrospect

“An incredibly useful set of debugging tools that you can plug into your app” – Evan Doll


FMDB

“A minimal Objective-C SQLite wrapper with a thoughtfully crafted API” – Evan Doll
Sometimes, you can’t use CoreData, and must use SQLite directly. With FMDB, it becomes easier.

ISO8601DateFormatter
“Peter Hosey’s indispensable date formatter is a mainstay of my library shortlist. Filed under
things I wish Apple provided (*cough* Base64 encoding *cough*), at least I can depend on ISO8601DateFormatter to get the job done.”
– Mattt Thompson


Nimbus

“Not only is Nimbus incredibly useful, but it serves as an exemplar of responsible development (a “framework whose feature set grows only as fast as its documentation” is an attitude I wish a lot more projects would adopt). Three cheers to Jeff Verkoeyen and all of the contributors for their hard work on this.” – Mattt Thompson

ReactiveCocoa

“Because the IDEA of this is more than great, and it’s a great, fresh approach on solving common problems. And even if you’re not using futures, they have a great library for KVO that automatically deregisters.” – Peter Steinberger

SDURLCache

“Peter Steinberger’s fork of SDURLCache is as useful as it is an impressive example of some fascinating optimization strategies. Although recent updates to NSURLCache obviate some of the need of SDURLCache, it’s still a great choice as a less mysterious, more featured implementation of URL caching.” – Mattt Thompson

It’s good to remember that since iOS 5, NSURLCache supports disk cache. However, SDURLCache may be helpful if you need more control over caching.

TTTAttributedLabel

“TTTAttributedLabel is really great if you need to show attributed text prior to iOS 6.” – Sam Soffes

The winners

SSToolkit

“Sam Soffes is a force of nature when it comes to Objective-C software, and SSToolkit exemplifies that. It’s a veritable tour-de-force of functionality, from UI components to handy Foundation categories. And all well-designed and documented. Brilliant.” – Mattt Thompson

Mattt describes very well what SSToolkit is. Besides having UI components, it has a lot of categories to make our lives better, helping us with common problems, such as detecting if a device has Retina Display or cropping an image.

GPUImage

GPUImage is a great framework to deal with image, live camera and video processing, using the GPU instead of the CPU, which makes it a lot faster. It is also faster than Apple’s Core Image, and supports custom filters and iOS 4, which Core Image doesn’t. However, it currently lacks of some advanced features that Core Image has, such as face detection. It’s very well documented, with sample applications. Give it a chance!

SocketRocket

“If you’re working with Web Sockets on iOS, look no further than SocketRocket by Mike Lewis of Square. Super-solid and easy-to-use, it’s a perfect fit for any real-time app.” – Mattt Thompson

Web Sockets allow bi-direction communication over a single TCP connection. Only some modern browsers support it, but it’s really powerful in real-time applications. Pooling seem so wrong now, doesn’t it?

HockeyKit

“We use HockeyApp for beta distribution and in-app crash reporting. Highly recommended.” – Evan Doll
“The best iOS crash reporter on the market. Even has the stack trace when an exception fires. Not even Apple has that feature.” – Peter Steinberger

HockeyKit reduces the pain of beta distribution, and also has an amazing crash report. Try it!

JSONKit

“Blazing fast JSON parsing, backwards compatible with older iOS versions” – Evan Doll
“A JSON implementation written by one of the most badass Objective-C developers” – Jeff Verkoeyen

It’s important to remember that iOS has native JSON implementation (NSJSONSerialization) since iOS 5, but JSONKit sometimes is still useful.

MagicalRecord

Playing with Core Data is kind of lame. A lot of boilerplate code, extra complexity… frustrating. MagicalRecord was created to solve that problems, keeping the option further customize the requests if needed. It was inspired by Rails’ Active Record, which is based on the Active Record Pattern, named by Martin Fowler.

RestKit

RestKit is a library created to reduce the code (and work) needed to get your app integrated with a REST remote API. It can do the network stuff, parse the results (XML or JSON) and map them into your own custom classes. Seems too magical? Be sure to take a look at Introduction to RESTKit Tutorial by iOS Tutorial Team Member Scott McAlister.

TestFlight

TestFlight is a service to easily distribute your beta builds to your tester. No iTunes, no need to manually download .ipa files, no more long emails with instructions. The tester receives an email with a link, and it just works. Besides providing distribution, it also allows you to get crash reports, get feedback that your testers give from inside the app and even put checkpoints (to see if a feature is really being used, for example). It now has a desktop app, that uploads builds even faster! It also have some APIs, so you can automate your distribution flow, creating a continuos integration environment (we cover that on iOS 6 By Tutorials book!).

MBProgressHUD

Sometimes, our apps are required to do long tasks, such as I/O (mainly networking, or even files) or hard processing. However, the user must have a visual feedback, so he won’t think the app has crashed. MBProgressHUD provides it, by creating a HUD (a transparent display that shows info to the user), usually with an UIActivityIndicator on it (but it’s customizable!). You can also configure some other things, like the text that is shown, the animation, x and y offsets, and a lot more! We have some tutorials that use it: Introduction to In-App Purchases, Introduction to MapKit on iOS Tutorial and How to Write an iOS App That Uses a Web Service.

AND THE GREAT WINNER IS:

AFNetworking!

“Light-weight and super fast, AFNetworking runs circles around other networking frameworks.” – Jeff Verkoeyen

“It’s a fresh start on networking, has a great API and is widely used (and thus greatly tested).
I see so many networking libraries… but this stuff is hard. Better stand on the shoulders of giants then reinvent your own.”
– Peter Steinberger

“I really love AFNetworking. It’s a really fantastic and fresh approach to networking. – Sam Soffes

AFNetworking is everything our guests told us. It’s a fresh start: it was written with blocks in mind since the beginning (remember that blocks were introduced only on iOS 4.0), as well as GCD and NSOperation. It also uses ARC now and it requires iOS 5.0 or above.

It’s well designed, with the idea that the core should have only what really matters (there’s some plugins available, to extend the existing features). It’s widely used and it has been well adopted by the community (it’s currently the third most watched Objective-C repository on GitHub). Besides that, it’s constantly evolving and has such a rich documentation, with plenty of examples available.

For being the Readers’ Choice (since it was the most voted library in by our pool), its creators Mattt Thompson (who was also our guest here) and Scott Raymond will each receive each a gorgeous award!

Take a look on how beautiful they’re. You deserve it, guys! Thanks for creating this amazing library (and open sourcing it)!

The awards for AFNetworking creators

Ray will be in touch with Matt and Scott to ship them their rewards ASAP. Congrats again Matt and Scott, and on behalf of the iOS community we send you a huge thanks!

Note: These awards were kindly donated by Greg from MTMawards.com. If you like these awards and want to order some for your own awards at your company, Greg mentioned there’s a 10% discount for any reader of this site – just use the discount code “OK1232″. Thanks again Greg!

Want to learn AFNetworking? We have a bunch of tutorials on that! :] Here they are:

Some of you might be thinking: “What about ASIHTTPRequest? Why wasn’t that on the list? I doubt this AFNetworking thing is better than that!”

ASIHTTPRequest was very important on the iOS ecosystem a while back. However, it suffers from some bad design decisions, and it’s too old now. It was created on 2008, when things were a lot different from now. No ARC, no GCD, no blocks… even its creator say it’s time to let it go. Give AFNetworking a chance. You won’t be sorry!

To Be Or Not To Be?

As I said in the beggining of the article, some guest stars (and iOS Tutorial Team members) told us that they usually write their own stuff, instead of using an external library. Bill Dudney pointed a good reason to do so: “The thing I hate about most frameworks is that people copy 5K lines of code when they need 15″.

iOS Tutorial Team Member Matthijs Hollemans also agreed with Bill: “They are often too complex, have too many features that I don’t use”. So you might ask yourself: “Do I need to rewrite everything from the scratch? I don’t have any idea on how should I start!”.

Matthijs also gave us an answer: “Sometimes I take an existing library, such as MBProgressHUD, to see how they have solved that problem, and then rewrite it to make it simpler, more robust, and more up-to-date with current APIs”.

He went even further about the need of external libraries: “A lot of the third-party libraries out there were originally written for iOS 2.x or 3.x, but since then great new stuff has been added such as blocks and ARC, which can really cut down on the amount of work the library has to do”.

I personally agree with both of them: you should use libraries when you really need, generally for problems that are not the core of your app and have been already solved by others, such as JSON/XML parsing (but that’s no longer needed after iOS 5) and networking (maybe that’s one reason to AFNetworking getting so voted – besides being delightful, of course).

But this kind of feeling comes only with experience. So, if you’re a rookie, don’t worry! Using libraries is how you’ll learn when they’d help and when they’d limit your app.

Where To Go From Here?

We let you know about some really useful libraries (at least at the time of the writing), but it’s up to you to take a deeper look at each one of them, understand how they work, and more importantly, when they are best suitable. We also pointed out some reasons to not use external libraries, or at least, be sure that you really need them.

Adding these libraries to your project is easier with CocoaPods, since all of them already have a spec file. Check out my previous post to know more about it!

If you have any libraries you really like to recommend to others, thoughts about this contest, or any other thoughts about iOS libraries in general, please join the forum discussion below! :]


This is a post by iOS Tutorial Team Member Marcelo Fabri, an iOS developer working at Movile. Check out his personal website or find him on Twitter or on .

Marcelo Fabri
Marcelo Fabri

Marcelo is a CS student at Unicamp and an iOS Developer at Movile.

At his little spare time, he works on his side projects and watches (a lot) of tv shows. He is also available to contract work.

You can reach him via LinkedIn, email or his personal site.

User Comments

11 Comments

  • Thanks for this useful post. Wrote a similar article some days ago...

    http://www.digitalvalues.de/why-do-things-twice/
    kbrook
  • Hello,

    I'm interested in using this kind of libraries, however I'm not familiar with github. Is there a tutorial on this (Wenderlich) site that explains how to get these libraries into XCode ?

    Should I put these libraries in a 'central' place and use it in multiple projects from that place, or should I copy these libraries in each project (folder)?

    sorry for this newbie question,

    Whasssaaahhhh
    Whasssaaahhh
  • with github you'll often be able to download a .zip of the source files. although i would look into learning how to clone git urls from the command line.

    if you are just getting started simply drag the relevant source files into your xcode file manager specific for each project. make sure sure "copy items into dest...." is checked and "add to targets" is checked when copying files into your project.

    Whasssaaahhh wrote:Hello,

    I'm interested in using this kind of libraries, however I'm not familiar with github. Is there a tutorial on this (Wenderlich) site that explains how to get these libraries into XCode ?

    Should I put these libraries in a 'central' place and use it in multiple projects from that place, or should I copy these libraries in each project (folder)?

    sorry for this newbie question,

    Whasssaaahhhh
    joshjetstream
  • ok - thanks for the .zip file tip, but guess I'm gonna search some git tutorial indeed

    could you give a hint regarding the 'good way of working' : in case you re-use a library in multiple projects, would it be a good idea to copy it in each project (like you say 'drag -> add to target') , or is it better to link to a central location where you always keep the last (and supposedly best) version of the library (under git control for example)?

    I can see two advantages in the 'centralized libraries' : saving harddisk space, and always having the latest version in each project, without having to copy.

    Although I see a disadvantage in that code in some projects might 'break' when the central library is updated, and some API changed. Or is this 'fear' more psychological, and in practice this doesn't happen too often with libraries?

    hope my question is clear, and thanx for the tip!
    Whasssaaahhh
  • I recommend BlocksKit https://github.com/pandamonia/BlocksKit
    Here is the description

    Blocks in C and Objective-C are downright magical. They make coding easier and potentially quicker, not to mention faster on the front end with multithreading and Grand Central Dispatch. BlocksKit hopes to facilitate this kind of programming by removing some of the annoying - and, in some cases, impeding - limits on coding with blocks.

    BlocksKit is a framework and static library for iOS 4.0+ and Mac OS X 10.6+
    zeiteisen
  • @Whasssaaahhh: Good problem with the dependencies question. There's a project called CocoaPods that is meant to help with this. The same guy that wrote this article (Marcelo) actually wrote a tutorial on that too!

    * http://www.raywenderlich.com/12139/intr ... -cocoapods

    As for a git tutorial, good news on that - we have a tutorial on using git with Xcode coming out soon, so stay tuned :]
    rwenderlich
  • reiz@versioneye.com
  • please provide a tutorial on how to use websockets in ios and using SocketRocket library to implement it.
    It would be a great help for the developers all over !!!!!!!
    Subodh11
  • This is very useful post. An thanks for writer
    vinod1988
  • Hi there - we jumped into a library called PDFReporter (rather new) - http://www.pdfreporting.com (commercial).
    They also have an open source version of the PDFReporter library on sourceforge (http://sourceforge.net/projects/pdfreporter).
    It is as powerful as Jasper Reports and it runs on iOS and Android offline - and if you are familiar to Jasper Reports you already know the power of that library. You can generate your predefined PDF-documents and reports directly on the mobile device. You can even use the iReport designer from Jasper.
    The integration is very simple and there are samples on sourceforge - there is also a sample app that can be downloaded on App Store and Google Store.

    Enjoy ! we did!

    Best Magnus
    mkarlsson
  • I love this post, i recomend capptivate.co for animation inspiration http://diferenciaentre.info
    patymadrid

Other Items of Interest

Ray's Monthly Newsletter

Sign up to receive a monthly newsletter with my favorite dev links, and receive a free epic-length tutorial as a bonus!

Advertise with Us!

Vote for Our Next Tutorial!

Every week, we alternate between Gaming and Non-Gaming tutorial votes. This week: Non-Gaming!

    Loading ... Loading ...

Last week's winner: Best iOS Animations in 2014. [Read Now]!

Suggest a Tutorial - Past Results

Hang Out With Us!

Every month, we have a free live Tech Talk - come hang out with us!


Coming up in October: Xcode 6 Tips and Tricks!

Sign Up - October

Our Books

Our Team

Tutorial Team

  • Jean-Pierre Distler
  • Barbara Reichart
  • Corinne Krych

... 49 total!

Update Team

  • Ray Fix
  • Andy Pereira

... 15 total!

Editorial Team

... 22 total!

Code Team

  • Orta Therox

... 3 total!

Translation Team

  • Vitaliy Zarubin
  • Wilson Lin

... 32 total!

Subject Matter Experts

  • Richard Casey

... 4 total!