Book Image

iPhone Location Aware Apps by Example - Beginner's Guide

By : Zeeshan Chawdhary
Book Image

iPhone Location Aware Apps by Example - Beginner's Guide

By: Zeeshan Chawdhary

Overview of this book

<p>From weather apps which give you a forecast based on your current location to fitness apps which track your speed and distance travelled. From Google Maps to Foursquare. Increasing mobility and social networking has made location awareness an integral aspect of modern iPhone applications. <br /><br />This book will teach you everything you need to know about building iPhone location aware apps, from simple Google maps to complex region monitoring and augmented reality. Build five real world location aware apps and get a taste of HTML5-based mobile app development.<br /><br />The book begins by explaining behind-the-scenes working of location-based systems, including GPS. Explore in depth iOS Core Location and the MapKit Framework, using examples depicting each capability of the respective frameworks. Having learnt about location and maps, you will build five location-based apps using the APIs and SDKs publicly available. The book has everything for a beginner as well as advanced users, with chapters devoted to advanced topics such as push notifications, geo fencing and augmented reality.</p>
Table of Contents (17 chapters)
iPhone Location Aware Apps by Example
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface

Time for action — extending Hello Location for nearby events


Let's begin writing our app now. Using the Hello Location application as the base of our project, we add a UITableView, which will be used to show the nearby events.

  1. 1. Open the Hello Location project. In the Hello_locationViewController.h file, create a UITableView variable that will be used to display a Table View in our app. We will also define a variable for connecting to the Eventful API URL via NSURLConnection. An XML Parser of the type NSXMLParer is created as well, and lastly, a variable to store the XML content retrieved from Eventful of the type NSMutableData is also created.

  2. 2. We also need to use the NSXMLParserDelegate in our class definition to use the methods implemented by the NSXMLParser. Create an outlet for the UITableView and name it myDataTable:

    #import <UIKit/UIKit.h>
    #import <CoreLocation/CoreLocation.h>
    @interface Hello_LocationViewController : UIViewController CLLocationManagerDelegate, UITableViewDataSource...