O'Reilly logo

iPhone Location Aware Apps by Example by Zeeshan Chawdhary

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action — building a local search app with foursquare

We use the example code from Eventful and the Last.fm example. However, this time we do not use XML; instead, we use JSON along with the new NSJSONSerialization class in iOS 5. The NSJSONSerialization class is useful to convert JSON-to-Core Foundation objects and Core Foundation objects to JSON. In simpler words, you can convert JSON retrieved from web services to NSArray. NSDictionary types easily and use in your application.

  1. We begin by creating a UITableView in our Hello_LocationViewController.xib file and exposing an outlet, as in the Eventful example before.
  2. Next in the didReceiveData method of NSURLConnection, we define an object of the type NSDictionary as NSDictionary ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required