skiptools / skiptools/skip-device
"This method can cause UI unresponsiveness if invoked on the main thread."
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 2
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Description
Minor runtime issue:
LocationProvider.swift:55 This method can cause UI unresponsiveness if invoked on the main thread. Instead, consider waiting for the '-locationManagerDidChangeAuthorization:' callback and checking 'authorizationStatus' first.
The highlighted line is the return CLLocationManager.locationServicesEnabled() in LocationProvider.swift, here:
public var isAvailable: Bool {
#if SKIP
return locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER) || locationManager.isProviderEnabled(LocationManager.NETWORK_PROVIDER)
#else
return CLLocationManager.locationServicesEnabled()
#endif
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in LocationProvider.swift at line 55 and inspect how location authorization changes are handled. Replace the main-thread-sensitive availability check with the authorization-status flow suggested in the issue, while preserving the existing isAvailable behavior; done means the warning is addressed without regressing availability reporting.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100