O'Reilly logo

iPhone JavaScript Cookbook by Arturo Fernandez Montoro

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

Identifying the current location

iPhone, iPod Touch, and iPad share an important feature: All of them are mobile devices. Taking advantage of the built-in GPS sensor, we can identify the device's current location. This kind of information can be very useful for those developers interested in geolocation.

Let's find out how to develop a simple application for retrieving our current location using our mobile iOS device. Our application will display our current location on the screen using the standard latitude and longitude coordinates. This information will be displayed after the user clicks the provided button.

Getting ready

For this recipe, we'll use the UiUIKit framework for building the graphical user interface of our application. Additionally, ...

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