skiptools / skiptools/skip-device

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

Open Beginner friendly
#14 1 comment 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.