Question

Since the iPod touch does not have a GPS, does it actually prompt for location access when calling CLLocationManager startMonitoringSignificantLocationChanges?

Was it helpful?

Solution

The significant location change is only for devices with a cellular chip (iPhones, iPads with cellular). It uses the cell towers to check for significant movement.

If you try to use startMonitoringSignificantLocationChanges on an iPod Touch, it will just fail silently. It won't ever ask the users to allow location services. It won't even invoke the locationManager:didFailWithError: method.

The best thing to do it to wrap your call in a check using +significantLocationChangeMonitoringAvailable

locationManager = [[CLLocationManager alloc] init];
[locationManager setDelegate:self];
if ([CLLocationManager significantLocationChangeMonitoringAvailable]) {
    [locationManager startMonitoringSignificantLocationChanges];
} else {
    NSLog(@"Can't monitor significant location changes");
}

OTHER TIPS

Yes.

The iPod touch can get its location by triangulating Wifi hotspots - it's still the user's location, so the user is still asked if they really want Bob's Money Stealer finding their location.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top