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

Using directions with location


So far, we have only used location values (latitude and longitude) from the iOS device, which lets us know the user's position. iOS devices can also report the direction of the user's phone (very helpful for navigation apps). The Core Location framework supports two methods of determining direction, using magnetometer and the device GPS.

Direction using heading

As discussed before, the direction in which an iOS device is pointing to is reported by the device magnetometer. This information is known as heading. The device GPS hardware reports the direction in which an iOS device is moving. This information is know as course.

Getting your app ready for direction

Before we can use direction information in our app, we need to include the UIRequiredDeviceCapabilities key in our Info.plist file. Depending on what we need to use, heading or course, in our app, the accompanying strings should be added in the UIRequiredDeviceCapabilitieskey.

Understanding heading...