iphone simulator crashes when it tries to access user location
Posted
by kevin Mendoza
on Stack Overflow
See other posts from Stack Overflow
or by kevin Mendoza
Published on 2010-06-18T01:57:42Z
Indexed on
2010/06/18
2:03 UTC
Read the original article
Hit count: 283
for some reason my code causes my program to crash. does anyone know why or how to fix it?
NSLog(@"here");
CLLocation *location = [locationManager location];
[mapView removeAnnotations:mapView.annotations];
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
CLLocationCoordinate2D workingCoordinate = [location coordinate];
NSLog(@" this is %@", workingCoordinate.latitude);
it makes it to the first NSLog, but somewhere between the first and second it crashes. My guess is that it has to do with the CLLocation *location line.
© Stack Overflow or respective owner