Skip to content

Commit 5082440

Browse files
committed
update
1 parent 3cecd9e commit 5082440

File tree

8 files changed

+13
-8
lines changed

8 files changed

+13
-8
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)
9+
.iOS(.v15), .watchOS(.v7),
1010
],
1111
products: [
1212
// Products define the executables and libraries a package produces, and make them visible to other packages.

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
- [x] Using new concurrency swift model around CoreLocation
66
- [x] Streaming current locations asynchronously
77
- [x] Customizable in terms of accuracy
8+
- [x] Support for iOS and watchOS
89
- [x] Errors handling
910

1011
## How to use
@@ -68,7 +69,11 @@ public protocol ILocationManagerViewModel: ObservableObject{
6869
if you are using the simulator don't forget to simulate locations
6970

7071
![simulate locations](https://github.com/The-Igor/d3-async-location/blob/main/img/image3.gif)
71-
72+
73+
Avalable on watchOs
74+
75+
![simulate locations](https://github.com/The-Igor/d3-async-location/blob/main/img/image1.gif)
76+
7277
## Documentation(API)
7378
- You need to have Xcode 13 installed in order to have access to Documentation Compiler (DocC)
7479
- Go to Product > Build Documentation or **⌃⇧⌘ D**

Sources/d3-async-location/LocationManagerAsync.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
import CoreLocation
99

1010
///Location manager streaming data asynchronously via instance of ``AsyncStream`` returning from ``start``
11-
@available(iOS 15.0, *)
12-
public final class LocationManagerAsync: NSObject, ILocationManagerAsync{
11+
@available(iOS 15.0, watchOS 7.0, *)
12+
public final class LocationManagerAsync: NSObject, CLLocationManagerDelegate, ILocationManagerAsync{
1313

1414
private typealias StreamType = AsyncStream<CLLocation>.Continuation
1515

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

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

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

1414
///Access was denied by user

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-
protocol ILocationManagerAsync: CLLocationManagerDelegate{
11+
protocol ILocationManagerAsync{
1212

1313
/// Check status and get stream of async data
1414
var start : AsyncStream<CLLocation> { get async throws }

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, *)
11+
@available(iOS 15.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
@@ -9,7 +9,7 @@ import SwiftUI
99
import CoreLocation
1010

1111
/// Viewmodel posting locations
12-
@available(iOS 15.0, *)
12+
@available(iOS 15.0, watchOS 7.0, *)
1313
public final class LMViewModel: ILocationManagerViewModel{
1414

1515
// MARK: - Public

img/image1.gif

1.38 MB
Loading

0 commit comments

Comments
 (0)