

iOS Libraries - coderholic
http://www.appdevmag.com/10-ios-libraries-to-make-your-life-easier/

======
uptown
No clue what happened to the original, but here's a post which lists what they
had on their list: [http://sordyl.info/2011/03/15/10-ios-libraries-to-make-
your-...](http://sordyl.info/2011/03/15/10-ios-libraries-to-make-your-life-
easier/)

MBProgressHUD – Progress Indicator Library

ASIHttpRequest – HTTP Network Library

JSON Framework – JSON Support

Flurry – Detailed Usage Statistics

RegexKitLite – Regular Expression Support

Facebook iOS SDK – Facebook API Library

SDWebImage – Simple Web Image Support

GData client – iPhone library for all of Google’s services

CorePlot – 2D Graph Plotter

Three20 – General iOS Library

~~~
kelnos
I've had some trouble with ASIHTTPRequest. It times out sending POST requests
(with decent sized payloads) sending to our Rails server, upwards of 98% of
the time. (I've literally only gotten one request to return properly.) Because
I'm a masochist, I wrote a minimal replacement using the CFSocket API, and it
works fine, every time.

My fear/guess is that something that ASIHTTPRequest is using is assuming that
it can bombard the socket with data even when the output buffer gets full. At
least that's the initial problem I had when I was writing my replacement, and
after staring at ASIHTTPRequest for days, I can't think of anything else.

------
mrcharles
Also, for game developers, Cocos2D iphone is pretty good too. It's reasonably
lightweight, fast, and completely free. Pair that up with Box2D or chipmunk,
which it comes with, and you have a complete game engine at no cost, with a
good amount of community support.

edit -- link: <http://www.cocos2d-iphone.org/>

~~~
oscardelben
I played with Cocos2d and I liked it a lot. Do you know the differences
between Cocos2d and the sparrow framework?

~~~
jon914
I use the Sparrow framework and find it to mimic the Flash's API more closely,
and the API as a whole is less complex. The primary downside at this time is
that the community is less active/developed, but the author is very helpful
when it comes to answering questions.

------
hiroprot
Beware overusing MBProgressHUD. It's a really nice library, but in general you
should try to avoid modal progress dialogues in favor of progress that can be
presented non-modally.

------
masklinn
> Regular Expressions are a really powerful tool, and the absence of support
> for regular expressions in the iPhone SDK seems to be a glaring omission.

NSRegularExpression was added to the iOS SDK in 4.0.

Not available if you still aim to be 3.x-compatible (for iPhones and first-gen
Touch), but 4.0 has been out for 9 months now, I think it's time to bury this
one (note: you could still find NSRegularExpression insufficient or inferior
to RKL, that's a different issue).

~~~
steipete
The Syntax for NSRegularExpression is _really_ awful. Main reason why I stick
with RegexKitLite.

~~~
masklinn
Sure, as I said you can find RegexKitLite superior for a variety of reasons,
but that's different from the original complaint that the iOS SDK ships
without regex support.

------
hiroprot
JSONKit (<https://github.com/johnezang/JSONKit>) is quite a bit faster than
the mentioned json-framework.

Also, an alternative to SDWebImage is EGOImageLoading
(<https://github.com/enormego/EGOImageLoading>), which might or might not be
better (Instagram uses it).

We've been using both libraries quite happily for our new startup, forkly.

~~~
Zev
JSONKit is less stable than yajl/touchjson/json-framework is. I was seeing 2-3
crashes/day in it when I last tried using it[1], switched back to yawl and
haven't had any crashes in json parsing since.

1\. About three weeks ago.

------
nix
People forget that you can just use C for the simple stuff. Many of these
Objective-C classes are slow, verbose, buggy, and poorly documented compared
to the equivalent open source C libraries. In many cases the C API is just as
nice - maybe slightly less fancy, but polished from years of actual use. Why
use ASIHTTPRequest or NSHTTPRequest when libcurl is mature and fast and cross-
platform? What do you really gain by wrapping Objective-C around your regex or
date handling? You'll find out when you start profiling (or porting to any
non-Apple system).

The Objective-C _language_ (Smalltalk in C) was a nice idea (in the 80s...)
but newcomers to iOS should be aware that the non-UI parts of the Cocoa/UIKit
_libraries_ are garbage compared to what C programmers have built over the
past thirty years. I've had to replace enough of the ObjC libraries I've used
with plain C that I just start with the C code now.

~~~
Zev
If you want to talk about tested and battle-hardened code, make sure that you
really have the older API :)

Foundation (and, by extension, NSHTTPRequest and NSURLConnection and such) is
a few years older than cURL is. Foundation is really an implementation of the
OpenStep API designed by Sun and NeXT. in 1993. cURL was released in 1997.

What do you lose by having a higher level of abstraction that is more
flexible? Do you have raw profile data that shows that libcurl is
significantly faster and performs better?

Newcomers to anything should be aware that old biases die hard and people on
the internet should be taken with a grain of salt.

------
jashmenn
ShareKit <http://www.getsharekit.com/> is also an awesome library for sharing
content on social sites.

~~~
gpambrozio
I was just going to mention it. I think it's _way_ better than the facebook
library mentioned in the article. I'm using for my upcoming app and it was a
snap to use it for facebook _and_ twitter

~~~
donkuan
I played with ShareKit for a while and it does include an impressive range of
sharing options (and really helped me understand how OAuth works). However I
found that the sharing functionality seemed to be tied to a specific visual
presentation, which I didn't like. In the end, I decided not to use it because
it didn't match the look and feel I wanted for my app.

~~~
stephth
Have you had trouble changing the UI? I haven't tried ShareKit but the website
highlights "Customizable UI" as one of the main features.

------
oscardelben
A few days ago I released the DateCalculations library which was inspired by
Ruby on Rails calculation library. I'll leave it here just in case:
<https://github.com/oscardelben/DateCalculations>

~~~
SoftwareMaven
Thank you! I'm coming up to the point of needing that very soon.

------
steipete
The list is quite crappy. E.g. :GData client" doesn't help you unless you
really need it. If you search for the _little_ things, like weak-linked yet
self deleting delegates, or good image crunching stuff, check out
PSFoundation.

<https://github.com/steipete/PSFoundation>

And if you wanna have it set up for you, just clone the app template:
<https://github.com/steipete/PSiOSAppTemplate>

~~~
hiroprot
That's good stuff, helped me get started a while back :)

~~~
KingOfB
Yea, I found a bunch of good projects from your repo a while back. I ended up
just using those projects instead though, as having a layer of repository-
indirection just didn't sit well with me.

------
wallflower
This one is of promise. We are evaluating it and trying it out (and sometimes
ripping it out).

<http://restkit.org/>

"RestKit is an Objective-C framework for iOS that aims to make interacting
with RESTful web services simple, fast and fun. It combines a clean, simple
HTTP request/response API with a powerful object mapping system that reduces
the amount of code you need to write to get stuff done."

~~~
pashields
I've played around with it and my team is using it on our current project.
I've found it to be a bit rough around the edges. It's still in the process of
transforming from an internal resource to a community based open source
project, but I think the two toasters crew is very serious about making it
work and are doing a great job.

I'd recommend others try it out if you aren't afraid of dipping into their
code. I found it to be quite readable and the two toasters team have shown
themselves to be very good at communicating with other people interested in
the project. My hope is that they will continue to work through the kinks and
RestKit can become a standard library for apps dealing with RESTful services.

------
zoul
I’ve written a block-based UIAlertView and UIActionSheet wrapper that makes
working with alerts and action sheets less painful (no more button indexes and
alert tags):

<https://github.com/zoul/Lambda-Alert>

~~~
steipete
You shouldn't have. I'm using UIAlertView+Blocks for years now. (PLBlocks in
the 3.x times)

[https://github.com/steipete/PSFoundation/blob/master/Utils/P...](https://github.com/steipete/PSFoundation/blob/master/Utils/PSAlertView.h)

Also check out PSFoundation, great stuff in there.

------
BenSS
ASIHttpRequest (hated handling network requests before), RegexKitLite (still
superior to the recent NSRegEx) and Flurry (why doesn't apple give you this
level of detail) are fantastic. Flurry's size is a bit of a downer, but
implementation is easy.

~~~
wallflower
[FlurryAPI setSessionReportsOnCloseEnabled:NO] seems to avoid some crashes on
reporting logging data.

------
uptown
Any recommendations for libraries related to user account sign-up /
authentication? I'm working on building a multi-player game and want to avoid
using Facebook (or another 3rd party) for user authentication.

~~~
pivo
I can't recommend it, because I haven't used it yet, but OpenFeint works on
iOS and Android, if that's important to you. <http://www.openfeint.com/>

~~~
mirkules
I've used OpenFeint. Integration is a breeze, and their staff are really
responsive and friendly. Plus you get a the benefit of their Free Game of the
Day promotion.

~~~
leslie
I like OpenFeint too, but there are some things to keep in mind. First,
integrating OpenFeint adds a few MB to your app size if you support both
landscape and portrait modes (I'm not sure what the exact size is - sorry).
This can be an important consideration if you're close to the over-the-air
limit. Second, Free Game of the Day is a great program, but it is something
you need to apply to. Not every game gets accepted.

~~~
mirkules
As far as FGOTD: OpenFeint contacted us to use our game for FGOTD - we didn't
really apply or anything like that. However, word of caution - any time your
game is free, you will get bottom-feeders expecting everything (this is a
different discussion altogether)

Back to the point, we only use our game in landscape mode, and we went from
70+ source files to 900+ source files after we added OF. So yeah, good point
about OTA limit. :)

------
allenbrunson
i tried MBProgressHUD. it is _way_ too heavy. so i wrote my own, smaller one:

[http://www.platinumball.net/blog/2010/02/27/uiprogresshud-
re...](http://www.platinumball.net/blog/2010/02/27/uiprogresshud-replacement/)

~~~
halostatue
I'm not sure what you found heavy about it; it's feature-full, yes. (I'm a bit
familiar with the code because I used it in a project of my own and have my
own fork of it at GitHub.)

~~~
allenbrunson
well, for one thing, one of its modes is to launch a background thread to
perform a user-specified operation while it is being displayed. not something
a control should be doing.

~~~
halostatue
That is just one of it's modes, and while in theory I agree with the
separation of concerns, the cognitive overhead of coordinating the control
with the worker thread vs letting MBProgressHUD manage both is substantial.

It's a fairly small addition for how much poet it gives. I agree that it's not
for everyone.

------
coderholic
Posted this just before I headed off to a meeting. Back from the meeting, and
my server is fried :)

Rebooted and back up now. Thanks for all the comments!

------
simonista
Funny, I was just wondering this morning if there's code somewhere to do the
"pull to refresh" action on tables that everyone seems to be adding recently.
Found a good round up here: [http://iosdevgoodies.joostschuur.com/pull-and-
release-refres...](http://iosdevgoodies.joostschuur.com/pull-and-release-
refresh-for-table-views). On further inspection the three20 version uses the
EGO version.

------
aaronbrethorst
And another 50 or so: <http://cocoacontrols.com/platforms/ios/controls>

------
Maakuth
I've never tried iOS development, and I'm a bit surprised by many of these
library recommendations. For example HTTP requests, regular expressions and
progress indicators strike me as something your platform definitely should
provide you with. Of course it's great that there are quality libraries to
fill in where the platform falls short.

~~~
varikin
These libraries exist because iOS (IMHO) is too low level in places, such as
HTTP requests. There is an interface you have to implement in order to make
HTTP requests, and you have to handle all the data (bytes) that come in
incrementally. It is very handy to have a library that handles the connection,
caching, redirects, errors, etc.

~~~
donkuan
The NSURLConnection class is actually pretty high level and does in fact
handle things like caching, redirects, errors, etc. for you. I have been using
ASIHttpRequest for a while -- it's not bad but can feel quite heavy at times.
For future projects, I may roll my own HTTP lib by wrapping NSURLConnection
directly. Btw, GCD and blocks in iOS 4 make it super easy to structure your
network calls the same way you would in JavaScript with xmlhttprequest and
closures, which makes async code much cleaner and easier to write.

------
charlief
Tapku - a few light-weight, handy classes: Coverflow, Graph, Month Calendar
View, EmptyView, Shake Window, Label Table View Cells, Alert Center, Circle
View

<https://github.com/devinross/tapkulibrary>

~~~
stevederico
Great little framework. The Month Calendar View is very similar to Apple's
Mobile Calendar.

Kal is another great Calendar Clone. <https://github.com/klazuka/Kal>

------
jasongullickson
I think we blew up "Flurry Analytics"; attempting to register just keeps
returning the registration page, with no error messages...

~~~
gyardley
Flurry's registration portal should be able to handle HN traffic without any
trouble. I'll e-mail them.

EDIT: This looks like a bug, but a bug caused by a user registering with an
e-mail already in the system. I'm guessing you've either used Flurry (or Pinch
Media, which merged with Flurry) before. Try the 'forgot your password?' link,
it'll send you a new one.

~~~
jasongullickson
You're right, I think I had an account with "Pinch" at one time, but I wasn't
getting a "you're already registered" error so I assumed the worst...

...excellent product however and I look forward to using it!

------
Aqua_Geek
I've been working on a database wrapper for SQLite to replace some plist
serialization stuff I was using. It's still in the early alpha stages, but
it's SOOO much easier to use than Core Data.

<https://github.com/AKQADC/Merlin>

------
eevilspock
Link doesn't work. "appdevmag.com" doesn't work. Googled "site:appdevmag.com"
and got zero hits.

WTF?

~~~
beaumartinez
It's a brand-new site: <http://twitter.com/appdevmag/status/47628367058579457>

------
btipling
Are there similar libraries for Android development? The hardest problem I
have is with making the UI look better than standard/default UI on both iPhone
and Android. Libraries that made that easier would be awesome.

~~~
middus
Please don't. I'd much rather have a consistent UI on my phone instead of each
dev brewing up his own controls.

~~~
glhaynes
There seems to be a lot of room especially on mobile for applying a "theme" to
system controls...

------
38leinad
I have written a light c-based api to access a windows file-share. Light samba
so to say; in case anyone can use it: <https://github.com/38leinaD/tango>

------
edge17
Is there a good way to authenticate youtube? The GData stuff I've found was
janky at best. It worked on a newly created account, but didn't work on my age
old pre-acquisition account

~~~
donkuan
That's not really a GData issue. I think GData ClientLogin no longer works for
YouTube accounts that are not linked to a Google account. AuthSub or OAuth
should still work though.

------
taylorbuley
Props for the headline edit according to house style
<http://ycombinator.com/newsfaq.html>

------
nika
Not just a library, and something that _really_ makes development for iOS
easier is Unity. <http://unity3d.com>

It may not be free, but it is well worth the money. I use it for non-game apps
because development is so rapid.

~~~
stephth
Interesting! Could you share urls to the non-games you made using unity?

------
nika
What would really make my iOS life easier is a good RSS client. I'm hoping for
something that I can give a URL to and which will give me back an NSArray of
dictionaries of entires, or something like that.

Too much to ask? Or should I just go the XML parsing route? (which seems like
it would be a lot of work and brittle) I've not yet dug into this, but this is
the next set of functionality I have to work on.

~~~
bradly
MWFeedParser sounds like exactly what you are looking for. It is really easy
to use.

<https://github.com/mwaterfall/MWFeedParser>

