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 — consuming the foursquare venue API - categories


  1. 1. Open Xcode, and start a new project named Hello foursquare, using the Tabbed Application template.

  2. 2. Add a new header file (.h extension) to your project, by selecting the File | New | New File | C and C++ option from Xcode file menu. Name the new file as Configuration.h. This file will hold the foursquare client ID and client secret, and any other foursquare configuration that we might need in future. Keep the configuration in one place, make the code more robust and easy-to-extend, as anyone can start using the code by replacing the configuration values. You can define the values in the Configuration.h file as follows:

    #ifndef Hello_foursquare_Configuration_h
    #define Hello_foursquare_Configuration_h
    #define CLIENT_ID @"XXXXXXXXXXXXXXXX"
    #define CLIENT_SECRET @"YYYYYYYYYYYYYYYY"
    #endif
    
  3. Here, XXXX is your client ID, and YYYY is your client secret.

  4. 3. Next, add the Core Location, MapKit, Twitter, and SQLite framework...