Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AsyncLocationKit.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|
s.name = 'AsyncLocationKit'
s.module_name = 'AsyncLocationKit'
s.version = '1.5.2'
s.version = '1.5.3'
s.summary = '📍async/await CoreLocation'
s.homepage = 'https://github.com/AsyncSwift/AsyncLocationKit'
s.license = 'MIT'
Expand Down
2 changes: 1 addition & 1 deletion Sources/AsyncLocationKit/AsyncLocationKit.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@

import Foundation

public let version: String = "1.0.5"
public let version: String = "1.5.3"
19 changes: 8 additions & 11 deletions Sources/AsyncLocationKit/AsyncLocationManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,14 @@ public final class AsyncLocationManager {
self.desiredAccuracy = desiredAccuracy
}

public func checkingPermissions() -> CLAuthorizationStatus {
if #available(iOS 14, *) {
return locationManager.authorizationStatus
} else {
return CLLocationManager.authorizationStatus()
}
}

public func updateAccuracy(with newAccuracy: LocationAccuracy) {
locationManager.desiredAccuracy = newAccuracy.convertingAccuracy
}
Expand Down Expand Up @@ -195,14 +203,3 @@ public final class AsyncLocationManager {
locationManager.stopRangingBeacons(satisfying: satisfying)
}
}

extension AsyncLocationManager {
/// Check if user already allowed location permission
private func checkingPermissions() -> CLAuthorizationStatus {
if #available(iOS 14, *) {
return locationManager.authorizationStatus
} else {
return CLLocationManager.authorizationStatus()
}
}
}