tags:

views:

545

answers:

1

whenever I try to return the lat/long coordinates for my current location, my application crashes with no explanation of the error...

NSLog(@"%@", mapView.userLocation.location.coordinate);

I am waiting until the phone finds the location as well...

+3  A: 

mapView.userLocation.location.coordinate is a struct while the %@ format specifier expects an object. This will work:

NSLog(@"%f, %f", mapView.userLocation.location.coordinate.latitude,
                 mapView.userLocation.location.coordinate.longitude);
Ole Begemann