Skip to content

Commit 398c5f1

Browse files
committed
Update Permission.swift
1 parent d381acf commit 398c5f1

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Sources/d3-async-location/Permission.swift

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ final class Permission{
2727
private var isDetermined : Bool{ status != .notDetermined }
2828

2929
/// Subscription to authorization status changes
30-
private var canellable : AnyCancellable?
30+
private var cancelable : AnyCancellable?
3131

3232
// MARK: - Life circle
3333

@@ -42,12 +42,14 @@ final class Permission{
4242
public func isGranted(for manager: CLLocationManager) async -> Bool{
4343
let status = await requestPermission(manager)
4444
return isAuthorized(status)
45-
}
45+
}
4646

4747
// MARK: - Private methods
4848

49+
50+
/// Subscribe for event when location manager change authorization status to go on access permission flow
4951
private func initSubscription(){
50-
canellable = NotificationCenter.default.publisher(for: Permission.authorizationStatus, object: nil)
52+
cancelable = NotificationCenter.default.publisher(for: Permission.authorizationStatus, object: nil)
5153
.sink { [weak self] value in
5254
self?.authorizationChanged(value)
5355
}

0 commit comments

Comments
 (0)