Skip to content

Commit 37f3c1a

Browse files
committed
update v14
1 parent 05bc269 commit 37f3c1a

File tree

9 files changed

+11
-12
lines changed

9 files changed

+11
-12
lines changed

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import PackageDescription
66
let package = Package(
77
name: "d3-async-location",
88
platforms: [
9-
.iOS(.v15), .watchOS(.v7),
9+
.iOS(.v14), .watchOS(.v7),
1010
],
1111
products: [
1212
// Products define the executables and libraries a package produces, and make them visible to other packages.

Sources/d3-async-location/LocationManagerAsync+/Delegate.swift

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,14 @@ extension LocationManagerAsync{
1111

1212
/// The methods that you use to receive events from an associated location-manager object
1313
/// The location manager calls its delegate’s methods to report location-related events to your app.
14-
@available(iOS 15.0, watchOS 7.0, *)
14+
@available(iOS 14.0, watchOS 7.0, *)
1515
final class Delegate: NSObject, CLLocationManagerDelegate{
1616

1717
/// Continuation asynchronously passing location data
1818
var stream: Streaming?{
1919
didSet {
20-
stream?.onTermination = { @Sendable termination in
21-
self.onTermination(termination)
22-
20+
stream?.onTermination = { @Sendable [weak self] termination in
21+
self?.onTermination(termination)
2322
}
2423
}
2524
}

Sources/d3-async-location/LocationManagerAsync+/Permission.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import SwiftUI
1212
extension LocationManagerAsync{
1313

1414
/// Helper class to determine permission to get access for streaming ``CLLocation``
15-
@available(iOS 15.0, watchOS 7.0, *)
15+
@available(iOS 14.0, watchOS 7.0, *)
1616
final class Permission{
1717

1818
/// Name of notification for event location manager changed authorization status

Sources/d3-async-location/LocationManagerAsync.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import CoreLocation
99

1010
///Location manager streaming data asynchronously via instance of `AsyncThrowingStream` returning from ``start`` asking permission in advance if it's not determined.
11-
@available(iOS 15.0, watchOS 7.0, *)
11+
@available(iOS 14.0, watchOS 7.0, *)
1212
final class LocationManagerAsync: ILocationManagerAsync{
1313

1414
// MARK: - Private properties

Sources/d3-async-location/enum/AsyncLocationErrors.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import CoreLocation
99

1010
/// Async locations manager errors
11-
@available(iOS 15.0, watchOS 7.0, *)
11+
@available(iOS 14.0, watchOS 7.0, *)
1212
public enum AsyncLocationErrors: Error{
1313

1414
///Access was denied by user

Sources/d3-async-location/enum/LocationStreamigState.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import Foundation
99

1010
/// Streaming states
11-
@available(iOS 15.0, watchOS 7.0, *)
11+
@available(iOS 14.0, watchOS 7.0, *)
1212
enum LocationStreamingState{
1313

1414
/// not streaming

Sources/d3-async-location/protocol/ILocationManagerAsync.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import Foundation
99
import CoreLocation
1010

11-
@available(iOS 15.0, watchOS 7.0, *)
11+
@available(iOS 14.0, watchOS 7.0, *)
1212
protocol ILocationManagerAsync{
1313

1414
/// Check status and get stream of async data

Sources/d3-async-location/protocol/ILocationManagerViewModel.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import CoreLocation
99
import SwiftUI
1010

11-
@available(iOS 15.0, watchOS 7.0, *)
11+
@available(iOS 14.0, watchOS 7.0, *)
1212
public protocol ILocationManagerViewModel: ObservableObject{
1313

1414
/// List of locations

Sources/d3-async-location/viewmodel/LMViewModel.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import CoreLocation
1212
/// Add or inject LMViewModel into a View
1313
/// @EnvironmentObject var model: LMViewModel
1414
/// Call method start() within async environment to start async stream of locations
15-
@available(iOS 15.0, watchOS 7.0, *)
15+
@available(iOS 14.0, watchOS 7.0, *)
1616
public final class LMViewModel: ILocationManagerViewModel{
1717

1818
// MARK: - Public

0 commit comments

Comments
 (0)