O'Reilly logo

Xamarin Mobile Application Development for iOS by Paul F. Johnson

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

GPS and Mapping

This is also covered by the Xamarin.Mobile component in part (the full functionality of Core Location is not replicated in the Xamarin.Mobile component, due to there not being an equivalent method on the other platforms that the component supports). Thankfully, the component and Core Location work together seamlessly.

GPS with Xamarin.Mobile

The Xamarin.Mobile component allows you to listen to the position of the device and act when the position has been changed, using the PositionChanged event. The following code demonstrates how to use it:

var iPhoneLocationManager = new Geolocator(); iPhoneLocationManager.DesiredAccuracy = 5; iPhoneLocationManager.StartListening(1, 10); iPhoneLocationManager.PositionChanged += (object sender,PositionEventArgs ...

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