Skip to content

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

Description

@jeffc-dev

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
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions