Skip to content

Commit

Permalink
Merge branch 'release/5.0.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
malcommac committed Dec 6, 2020
2 parents 3d16166 + eb2f856 commit bcbf8d1
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,15 @@ extension CLAuthorizationStatus: CustomStringConvertible {
return false
}
}

internal var isRejected: Bool {
switch self {
case .denied, .restricted:
return true
default:
return false
}
}

public var description: String {
switch self {
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftLocation/SwiftLocation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ public class LocationManager: LocationManagerDelegate, CustomStringConvertible {
}

private func failWeakAuthorizationRequests() {
guard authorizationStatus.isAuthorized == false else {
guard authorizationStatus.isRejected == true else {
// If we have already the authorization even request with `avoidRequestAuthorization = true`
// may receive notifications of locations.
return
Expand Down
2 changes: 1 addition & 1 deletion SwiftLocation.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "SwiftLocation"
s.version = "5.0.1"
s.version = "5.0.2"
s.summary = "Location Manager Made Easy"
s.description = <<-DESC
Efficient location tracking for iOS with support for oneshot/continuous/background tracking, reverse geocoding, autocomplete, geofencing, beacon monitoring & broadcasting
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ class GPSController: UIViewController, UITableViewDelegate, UITableViewDataSourc
let request = SwiftLocation.gpsLocationWith(serviceOptions)

serviceOptions = GPSLocationOptions()
serviceOptions.avoidRequestAuthorization = true
reloadData()

AppDelegate.attachSubscribersToGPS([request])
Expand Down

0 comments on commit bcbf8d1

Please sign in to comment.