intuit / intuit/LocationManager

This method can cause UI unresponsiveness if invoked on the main thread.

Open
#142 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Objective-C
Stars
2.5k
Forks
383
PR merge metrics
No merged PRs in 30d

Description

Got the following error in Xcode console:

> This method can cause UI unresponsiveness if invoked on the main thread. Instead, consider waiting for the `-locationManagerDidChangeAuthorization:` callback and checking `authorizationStatus` first.

In:

```Swift
+ (INTULocationServicesState)locationServicesState
{
if ([CLLocationManager locationServicesEnabled] == NO) {
return INTULocationServicesStateDisabled;
}
else if ([CLLocationManager authorizationStatus] == kCLAuthorizationStatusNotDetermined) {
return INTULocationServicesStateNotDetermined;
}
else if ([CLLocationManager authorizationStatus] == kCLAuthorizationStatusDenied) {
return INTULocationServicesStateDenied;
}
else if ([CLLocationManager authorizationStatus] == kCLAuthorizationStatusRestricted) {
return INTULocationServicesStateRestricted;
}

return INTULocationServicesStateAvailable;
}
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.