I have been doing some research on Apple Location services API and have a query as below. If my Settings -> Privacy -> Location services is OFF.
and my app location services is set to "while using" or "allow" and if I want to check the access?
will the below check work for all the combinations of global vs per-app access?
-(BOOL) locationAccess { return ([CLLocationManager respondsToSelector:@selector(authorizationStatus)] && ([CLLocationManager authorizationStatus] == kCLAuthorizationStatusAuthorizedWhenInUse || [CLLocationManager authorizationStatus] == kCLAuthorizationStatusAuthorizedAlways)); }
If yes, for the below table, is the output as expected?
Global per-App. func call
TRUE FALSE TRUE
FALSE FALSE FALSE
FALSE TRUE FALSE
TRUE FALSE FALSE
Please help