Skip to content

Commit b884f69

Browse files
committed
Uncommented all
1 parent 07c8791 commit b884f69

File tree

3 files changed

+6
-11
lines changed

3 files changed

+6
-11
lines changed

Sources/AsyncLocationKit/AnyLocationPerformer.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ protocol AnyLocationPerformer: AnyObject {
2828
var cancellabel: Cancellabel? { get set }
2929

3030
func eventSupported(_ event: CoreLocationDelegateEvent) -> Bool
31-
#if !os(tvOS)
3231
func invokedMethod(event: CoreLocationDelegateEvent)
33-
#endif
3432
func cancelation()
3533
}

Sources/AsyncLocationKit/AsyncDelegateProxy.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,7 @@ final class AsyncDelegateProxy: AsyncDelegateProxyInterface {
6767
func eventForMethodInvoked(_ event: CoreLocationDelegateEvent) {
6868
for performer in performers {
6969
if performer.eventSupported(event) {
70-
#if !os(tvOS)
7170
performer.invokedMethod(event: event)
72-
#endif
7371
}
7472
}
7573
}

Sources/AsyncLocationKit/AsyncLocationManager.swift

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,9 @@ public final class AsyncLocationManager {
152152
})
153153
}
154154

155-
#if !APPCLIP
155+
#if !APPCLIP && !os(tvOS)
156156
@available(*, deprecated, message: "Use new function requestPermission(with:)")
157-
@available(tvOS, unavailable)
158-
@available(iOS 14, tvOS 14, *)
157+
@available(iOS 14, *)
159158
public func requestAuthorizationAlways() async -> CLAuthorizationStatus {
160159
let authorizationPerformer = RequestAuthorizationPerformer(currentStatus: getAuthorizationStatus())
161160
return await withTaskCancellationHandler(operation: {
@@ -174,8 +173,7 @@ public final class AsyncLocationManager {
174173
} else {
175174
authorizationPerformer.linkContinuation(continuation)
176175
proxyDelegate.addPerformer(authorizationPerformer)
177-
// TODO
178-
// locationManager.requestAlwaysAuthorization()
176+
locationManager.requestAlwaysAuthorization()
179177
}
180178
#endif
181179
}
@@ -360,10 +358,11 @@ extension AsyncLocationManager {
360358
if #available(iOS 14, tvOS 14, watchOS 7, *), locationManager.authorizationStatus != .notDetermined && locationManager.authorizationStatus != .authorizedWhenInUse {
361359
continuation.resume(with: .success(locationManager.authorizationStatus))
362360
} else {
361+
#if !os(tvOS)
363362
authorizationPerformer.linkContinuation(continuation)
364363
proxyDelegate.addPerformer(authorizationPerformer)
365-
// TODO
366-
// locationManager.requestAlwaysAuthorization()
364+
locationManager.requestAlwaysAuthorization()
365+
#endif
367366
}
368367
#endif
369368
}

0 commit comments

Comments
 (0)