Hi,
I am developing an iPhone app using Titanium Alloy.
Other details :
Titanium Command-Line Interface, CLI version 4.0.0-beta3, Titanium SDK version 3.5.1.GA, Mac OS X 10.10
I am trying to use the Geolocation module to get the latitude and the longitude where the user currently is :
My code :
if (Ti.Geolocation.locationServicesEnabled) { Ti.Geolocation.accuracy = Ti.Geolocation.ACCURACY_THREE_KILOMETERS; Ti.Geolocation.distanceFilter = 10; Ti.Geolocation.preferredProvider = Ti.Geolocation.PROVIDER_GPS; Ti.Geolocation.getCurrentPosition(function(e) { if (!e.success || e.error) { Ti.API.info('Error: ' + e.error); return; } else { var latLon, longitude, latitude; if ( typeof e.coords.longitude !== 'undefined' && e.coords.longitude !== null) { longitude = e.coords.longitude; } if ( typeof e.coords.latitude !== 'undefined' && e.coords.latitude !== null) { latitude = e.coords.latitude; } latLon = latitude + "," + longitude; Ti.API.info("latLon" ) } });But I am getting this error :
Error: The operation couldn’t be completed. (kCLErrorDomain error 0.)How can I overcome this error ?
Thanks in advance