views:

31

answers:

1

In the iOS simulator, I am prompted to turn on my location when the app attempts to pinpoint my location. However, on an iphone running 4.1, I get a generic "An error has occurred" without any type of prompt. I checked my project's NSLogs/Alerts and none of them have a generic "An error has occurred." Is anyone aware of why this happens?

UPDATE:

This happens when a user has their location turned off. I have yet to figure out why the user is not prompted to turn it on and why - (void)locationManager:(CLLocationManager *)manager didFailWithError:(NSError *)error is not working.

A: 

The answer below solved the bug for me. This handled the error and prevents the prompt from appearing.

http://stackoverflow.com/questions/2333344/how-to-handle-dont-allow-for-location-manager/2333736#2333736

Oh Danny Boy