CLLocationManager has two methods to request permissions:

requestWhenInUseAuthorization
requestAlwaysAuthorization

However, these methods do nothing if the current authorization status is anything other than “kCLAuthorizationStatusNotDetermined”. I would like my application to start by only prompting users for location permission when the application is in use and only request higher permissions if the user takes an actions that requires it. 61 more words