Skip to content

Commit cbad979

Browse files
authored
Merge pull request #5 from AsyncSwift/development
macOS support (beta)
2 parents 23e7a35 + 99b526f commit cbad979

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

Package.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@ import PackageDescription
55

66
let package = Package(
77
name: "AsyncLocationKit",
8-
platforms: [.iOS("13.0")],
8+
platforms: [
9+
.iOS("13.0"),
10+
.macOS(.v12)
11+
],
12+
913
products: [
1014
.library(
1115
name: "AsyncLocationKit",

Sources/AsyncLocationKit/AsyncLocationManager.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,9 @@ public final class AsyncLocationManager {
130130
locationManager.stopMonitoringVisits()
131131
}
132132

133+
#if os(iOS)
134+
135+
@available(iOS 13, *)
133136
public func startUpdatingHeading() async -> HeadingMonitorStream {
134137
let performer = HeadingMonitorPerformer()
135138
return HeadingMonitorStream { stream in
@@ -147,6 +150,8 @@ public final class AsyncLocationManager {
147150
locationManager.stopUpdatingHeading()
148151
}
149152

153+
#endif
154+
150155
public func startRangingBeacons(satisfying: CLBeaconIdentityConstraint) async -> BeaconsRangingStream {
151156
let performer = BeaconsRangePerformer(satisfying: satisfying)
152157
return BeaconsRangingStream { stream in

0 commit comments

Comments
 (0)