I've added this to index.js :
if (Ti.Geolocation.locationServicesEnabled) { Ti.Geolocation.purpose = 'Get Current Location'; Ti.Geolocation.accuracy = Ti.Geolocation.ACCURACY_BEST; Ti.Geolocation.distanceFilter = 10; Ti.Geolocation.preferredProvider = Ti.Geolocation.PROVIDER_GPS; Ti.Geolocation.addEventListener('location', function(e) { if (e.error) { alert('Error:' + e.error); } else { Ti.API.info(e.coords); } }); } else { alert('Please enable location services'); }I've added this to tiapp.xml :
<key>NSLocationWhenInUseUsageDescription</key> <string>Test NSLocationWhenInUseUsageDescription</string> <key>NSLocationAlwaysUsageDescription</key> <string>Test NSLocationAlwaysUsageDescription</string>I keep having this message when I compile :
[ERROR] The keys NSLocationAlwaysUsageDescription or NSLocationWhenInUseUsageDescription are not defined in your tiapp.xml. Starting with iOS8 this is required.I've even tried to remove the Build and Resources folders and compile again...
Any idea ?