Is there a way to delay code from running until the user has answered the current location prompt? My app fetches annotations and puts them on the map. When the app launches for the first time and the user allows current location it fails to fetch any annotations because the code already ran without receiving a current location. Thanks in advance.
Asked
Active
Viewed 137 times
1 Answers
2
You can implement the following CLLocationManagerDelegate
method:
- (void)locationManager:(CLLocationManager *)manager didChangeAuthorizationStatus:(CLAuthorizationStatus)status
and only show your annotations after that method is called. It will be called when the user accepts or rejects the current location prompt.

TotoroTotoro
- 17,524
- 4
- 45
- 76
-
That did the job! If only I asked before my app was in the store.. Thanks! – user1681673 Nov 13 '13 at 22:41