Build Information
Failed to build HealthSnapKit, reference main (6e7adf), with Swift 6.0 for macOS (SPM) on 10 Apr 2026 21:13:03 UTC.
Build Command
env DEVELOPER_DIR=/Applications/Xcode-16.2.0.app xcrun swift build --arch arm64Build Log
| |- error: 'appleExerciseTime' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
81 |
82 | let standSamples = try await standHourSamples(predicate: predicate)
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/ActivityProvider.swift:80:103: error: 'HKUnit' is only available in macOS 13.0 or newer
4 | /// Fetches daily activity summaries (steps, energy, distance, exercise, stand).
5 | @MainActor
6 | public final class ActivityProvider {
| `- note: add @available attribute to enclosing class
7 | private let store: HealthStoreProtocol
8 |
:
51 | }
52 |
53 | private func date(_ date: Date, calendar: Calendar) async throws -> ActivitySnapshot {
| `- note: add @available attribute to enclosing instance method
54 | guard store.isHealthDataAvailable() else { throw HealthSnapError.notAvailable }
55 | guard let interval = CalendarDayRange.dayInterval(containing: date, calendar: calendar) else {
:
78 | let exerciseStats = try await statistics(for: .appleExerciseTime, predicate: predicate)
79 | if exerciseStats != nil { sawData = true }
80 | let exerciseMinutes = Int((try await sum(from: exerciseStats, type: .appleExerciseTime, unit: HKUnit.minute())).rounded())
| |- error: 'HKUnit' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
81 |
82 | let standSamples = try await standHourSamples(predicate: predicate)
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/ActivityProvider.swift:103:26: error: 'HKQuantityType' is only available in macOS 13.0 or newer
4 | /// Fetches daily activity summaries (steps, energy, distance, exercise, stand).
5 | @MainActor
6 | public final class ActivityProvider {
| `- note: add @available attribute to enclosing class
7 | private let store: HealthStoreProtocol
8 |
:
100 | }
101 |
102 | private func statistics(for identifier: HKQuantityTypeIdentifier, predicate: NSPredicate) async throws -> HKStatistics? {
| `- note: add @available attribute to enclosing instance method
103 | guard let type = HKQuantityType.quantityType(forIdentifier: identifier) else {
| |- error: 'HKQuantityType' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
104 | throw HealthSnapError.noData
105 | }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/ActivityProvider.swift:114:39: error: 'HKQuantityType' is only available in macOS 13.0 or newer
4 | /// Fetches daily activity summaries (steps, energy, distance, exercise, stand).
5 | @MainActor
6 | public final class ActivityProvider {
| `- note: add @available attribute to enclosing class
7 | private let store: HealthStoreProtocol
8 |
:
111 | }
112 |
113 | private func sum(from statistics: HKStatistics?, type identifier: HKQuantityTypeIdentifier, unit: HKUnit) async throws -> Double {
| `- note: add @available attribute to enclosing instance method
114 | guard let statistics, let _ = HKQuantityType.quantityType(forIdentifier: identifier) else {
| |- error: 'HKQuantityType' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
115 | return 0
116 | }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/ActivityProvider.swift:124:31: error: 'HKObjectType' is only available in macOS 13.0 or newer
4 | /// Fetches daily activity summaries (steps, energy, distance, exercise, stand).
5 | @MainActor
6 | public final class ActivityProvider {
| `- note: add @available attribute to enclosing class
7 | private let store: HealthStoreProtocol
8 |
:
121 | }
122 |
123 | private func standHourSamples(predicate: NSPredicate) async throws -> [HKCategorySample] {
| `- note: add @available attribute to enclosing instance method
124 | guard let standType = HKObjectType.categoryType(forIdentifier: .appleStandHour) else {
| |- error: 'HKObjectType' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
125 | return []
126 | }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/ActivityProvider.swift:124:73: error: 'appleStandHour' is only available in macOS 13.0 or newer
4 | /// Fetches daily activity summaries (steps, energy, distance, exercise, stand).
5 | @MainActor
6 | public final class ActivityProvider {
| `- note: add @available attribute to enclosing class
7 | private let store: HealthStoreProtocol
8 |
:
121 | }
122 |
123 | private func standHourSamples(predicate: NSPredicate) async throws -> [HKCategorySample] {
| `- note: add @available attribute to enclosing instance method
124 | guard let standType = HKObjectType.categoryType(forIdentifier: .appleStandHour) else {
| |- error: 'appleStandHour' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
125 | return []
126 | }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/ActivityProvider.swift:131:53: error: 'HKSampleSortIdentifierStartDate' is only available in macOS 13.0 or newer
4 | /// Fetches daily activity summaries (steps, energy, distance, exercise, stand).
5 | @MainActor
6 | public final class ActivityProvider {
| `- note: add @available attribute to enclosing class
7 | private let store: HealthStoreProtocol
8 |
:
121 | }
122 |
123 | private func standHourSamples(predicate: NSPredicate) async throws -> [HKCategorySample] {
| `- note: add @available attribute to enclosing instance method
124 | guard let standType = HKObjectType.categoryType(forIdentifier: .appleStandHour) else {
125 | return []
:
129 | predicate: predicate,
130 | limit: HKObjectQueryNoLimit,
131 | sortDescriptors: [NSSortDescriptor(key: HKSampleSortIdentifierStartDate, ascending: true)]
| |- error: 'HKSampleSortIdentifierStartDate' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
132 | )
133 | return raw.compactMap { $0 as? HKCategorySample }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/ActivityProvider.swift:133:40: error: 'HKCategorySample' is only available in macOS 13.0 or newer
4 | /// Fetches daily activity summaries (steps, energy, distance, exercise, stand).
5 | @MainActor
6 | public final class ActivityProvider {
| `- note: add @available attribute to enclosing class
7 | private let store: HealthStoreProtocol
8 |
:
121 | }
122 |
123 | private func standHourSamples(predicate: NSPredicate) async throws -> [HKCategorySample] {
| `- note: add @available attribute to enclosing instance method
124 | guard let standType = HKObjectType.categoryType(forIdentifier: .appleStandHour) else {
125 | return []
:
131 | sortDescriptors: [NSSortDescriptor(key: HKSampleSortIdentifierStartDate, ascending: true)]
132 | )
133 | return raw.compactMap { $0 as? HKCategorySample }
| |- error: 'HKCategorySample' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
134 | }
135 |
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/ActivityProvider.swift:138:29: error: 'HKCategoryValueAppleStandHour' is only available in macOS 13.0 or newer
4 | /// Fetches daily activity summaries (steps, energy, distance, exercise, stand).
5 | @MainActor
6 | public final class ActivityProvider {
| `- note: add @available attribute to enclosing class
7 | private let store: HealthStoreProtocol
8 |
:
134 | }
135 |
136 | private func countStoodHours(samples: [HKCategorySample]) -> Int {
| `- note: add @available attribute to enclosing instance method
137 | samples.filter { sample in
138 | sample.value == HKCategoryValueAppleStandHour.stood.rawValue
| |- error: 'HKCategoryValueAppleStandHour' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
139 | }.count
140 | }
[13/20] Compiling HealthSnapKit ActivityProvider.swift
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/ActivityProvider.swift:102:111: error: 'HKStatistics' is only available in macOS 13.0 or newer
4 | /// Fetches daily activity summaries (steps, energy, distance, exercise, stand).
5 | @MainActor
6 | public final class ActivityProvider {
| `- note: add @available attribute to enclosing class
7 | private let store: HealthStoreProtocol
8 |
:
100 | }
101 |
102 | private func statistics(for identifier: HKQuantityTypeIdentifier, predicate: NSPredicate) async throws -> HKStatistics? {
| | `- error: 'HKStatistics' is only available in macOS 13.0 or newer
| `- note: add @available attribute to enclosing instance method
103 | guard let type = HKQuantityType.quantityType(forIdentifier: identifier) else {
104 | throw HealthSnapError.noData
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/ActivityProvider.swift:113:39: error: 'HKStatistics' is only available in macOS 13.0 or newer
4 | /// Fetches daily activity summaries (steps, energy, distance, exercise, stand).
5 | @MainActor
6 | public final class ActivityProvider {
| `- note: add @available attribute to enclosing class
7 | private let store: HealthStoreProtocol
8 |
:
111 | }
112 |
113 | private func sum(from statistics: HKStatistics?, type identifier: HKQuantityTypeIdentifier, unit: HKUnit) async throws -> Double {
| | `- error: 'HKStatistics' is only available in macOS 13.0 or newer
| `- note: add @available attribute to enclosing instance method
114 | guard let statistics, let _ = HKQuantityType.quantityType(forIdentifier: identifier) else {
115 | return 0
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/ActivityProvider.swift:113:103: error: 'HKUnit' is only available in macOS 13.0 or newer
4 | /// Fetches daily activity summaries (steps, energy, distance, exercise, stand).
5 | @MainActor
6 | public final class ActivityProvider {
| `- note: add @available attribute to enclosing class
7 | private let store: HealthStoreProtocol
8 |
:
111 | }
112 |
113 | private func sum(from statistics: HKStatistics?, type identifier: HKQuantityTypeIdentifier, unit: HKUnit) async throws -> Double {
| | `- error: 'HKUnit' is only available in macOS 13.0 or newer
| `- note: add @available attribute to enclosing instance method
114 | guard let statistics, let _ = HKQuantityType.quantityType(forIdentifier: identifier) else {
115 | return 0
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/ActivityProvider.swift:123:76: error: 'HKCategorySample' is only available in macOS 13.0 or newer
4 | /// Fetches daily activity summaries (steps, energy, distance, exercise, stand).
5 | @MainActor
6 | public final class ActivityProvider {
| `- note: add @available attribute to enclosing class
7 | private let store: HealthStoreProtocol
8 |
:
121 | }
122 |
123 | private func standHourSamples(predicate: NSPredicate) async throws -> [HKCategorySample] {
| | `- error: 'HKCategorySample' is only available in macOS 13.0 or newer
| `- note: add @available attribute to enclosing instance method
124 | guard let standType = HKObjectType.categoryType(forIdentifier: .appleStandHour) else {
125 | return []
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/ActivityProvider.swift:136:44: error: 'HKCategorySample' is only available in macOS 13.0 or newer
4 | /// Fetches daily activity summaries (steps, energy, distance, exercise, stand).
5 | @MainActor
6 | public final class ActivityProvider {
| `- note: add @available attribute to enclosing class
7 | private let store: HealthStoreProtocol
8 |
:
134 | }
135 |
136 | private func countStoodHours(samples: [HKCategorySample]) -> Int {
| | `- error: 'HKCategorySample' is only available in macOS 13.0 or newer
| `- note: add @available attribute to enclosing instance method
137 | samples.filter { sample in
138 | sample.value == HKCategoryValueAppleStandHour.stood.rawValue
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/ActivityProvider.swift:58:25: error: 'HKQuery' is only available in macOS 13.0 or newer
4 | /// Fetches daily activity summaries (steps, energy, distance, exercise, stand).
5 | @MainActor
6 | public final class ActivityProvider {
| `- note: add @available attribute to enclosing class
7 | private let store: HealthStoreProtocol
8 |
:
51 | }
52 |
53 | private func date(_ date: Date, calendar: Calendar) async throws -> ActivitySnapshot {
| `- note: add @available attribute to enclosing instance method
54 | guard store.isHealthDataAvailable() else { throw HealthSnapError.notAvailable }
55 | guard let interval = CalendarDayRange.dayInterval(containing: date, calendar: calendar) else {
56 | throw HealthSnapError.noData
57 | }
58 | let predicate = HKQuery.predicateForSamples(withStart: interval.start, end: interval.endExclusive, options: [])
| |- error: 'HKQuery' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
59 |
60 | var sawData = false
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/ActivityProvider.swift:62:53: error: 'stepCount' is only available in macOS 13.0 or newer
4 | /// Fetches daily activity summaries (steps, energy, distance, exercise, stand).
5 | @MainActor
6 | public final class ActivityProvider {
| `- note: add @available attribute to enclosing class
7 | private let store: HealthStoreProtocol
8 |
:
51 | }
52 |
53 | private func date(_ date: Date, calendar: Calendar) async throws -> ActivitySnapshot {
| `- note: add @available attribute to enclosing instance method
54 | guard store.isHealthDataAvailable() else { throw HealthSnapError.notAvailable }
55 | guard let interval = CalendarDayRange.dayInterval(containing: date, calendar: calendar) else {
:
60 | var sawData = false
61 |
62 | let stepsStats = try await statistics(for: .stepCount, predicate: predicate)
| |- error: 'stepCount' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
63 | if stepsStats != nil { sawData = true }
64 | let steps = Int((try await sum(from: stepsStats, type: .stepCount, unit: HKUnit.count())).rounded())
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/ActivityProvider.swift:64:65: error: 'stepCount' is only available in macOS 13.0 or newer
4 | /// Fetches daily activity summaries (steps, energy, distance, exercise, stand).
5 | @MainActor
6 | public final class ActivityProvider {
| `- note: add @available attribute to enclosing class
7 | private let store: HealthStoreProtocol
8 |
:
51 | }
52 |
53 | private func date(_ date: Date, calendar: Calendar) async throws -> ActivitySnapshot {
| `- note: add @available attribute to enclosing instance method
54 | guard store.isHealthDataAvailable() else { throw HealthSnapError.notAvailable }
55 | guard let interval = CalendarDayRange.dayInterval(containing: date, calendar: calendar) else {
:
62 | let stepsStats = try await statistics(for: .stepCount, predicate: predicate)
63 | if stepsStats != nil { sawData = true }
64 | let steps = Int((try await sum(from: stepsStats, type: .stepCount, unit: HKUnit.count())).rounded())
| |- error: 'stepCount' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
65 |
66 | let activeStats = try await statistics(for: .activeEnergyBurned, predicate: predicate)
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/ActivityProvider.swift:64:82: error: 'HKUnit' is only available in macOS 13.0 or newer
4 | /// Fetches daily activity summaries (steps, energy, distance, exercise, stand).
5 | @MainActor
6 | public final class ActivityProvider {
| `- note: add @available attribute to enclosing class
7 | private let store: HealthStoreProtocol
8 |
:
51 | }
52 |
53 | private func date(_ date: Date, calendar: Calendar) async throws -> ActivitySnapshot {
| `- note: add @available attribute to enclosing instance method
54 | guard store.isHealthDataAvailable() else { throw HealthSnapError.notAvailable }
55 | guard let interval = CalendarDayRange.dayInterval(containing: date, calendar: calendar) else {
:
62 | let stepsStats = try await statistics(for: .stepCount, predicate: predicate)
63 | if stepsStats != nil { sawData = true }
64 | let steps = Int((try await sum(from: stepsStats, type: .stepCount, unit: HKUnit.count())).rounded())
| |- error: 'HKUnit' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
65 |
66 | let activeStats = try await statistics(for: .activeEnergyBurned, predicate: predicate)
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/ActivityProvider.swift:66:54: error: 'activeEnergyBurned' is only available in macOS 13.0 or newer
4 | /// Fetches daily activity summaries (steps, energy, distance, exercise, stand).
5 | @MainActor
6 | public final class ActivityProvider {
| `- note: add @available attribute to enclosing class
7 | private let store: HealthStoreProtocol
8 |
:
51 | }
52 |
53 | private func date(_ date: Date, calendar: Calendar) async throws -> ActivitySnapshot {
| `- note: add @available attribute to enclosing instance method
54 | guard store.isHealthDataAvailable() else { throw HealthSnapError.notAvailable }
55 | guard let interval = CalendarDayRange.dayInterval(containing: date, calendar: calendar) else {
:
64 | let steps = Int((try await sum(from: stepsStats, type: .stepCount, unit: HKUnit.count())).rounded())
65 |
66 | let activeStats = try await statistics(for: .activeEnergyBurned, predicate: predicate)
| |- error: 'activeEnergyBurned' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
67 | if activeStats != nil { sawData = true }
68 | let active = try await sum(from: activeStats, type: .activeEnergyBurned, unit: HKUnit.kilocalorie())
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/ActivityProvider.swift:68:62: error: 'activeEnergyBurned' is only available in macOS 13.0 or newer
4 | /// Fetches daily activity summaries (steps, energy, distance, exercise, stand).
5 | @MainActor
6 | public final class ActivityProvider {
| `- note: add @available attribute to enclosing class
7 | private let store: HealthStoreProtocol
8 |
:
51 | }
52 |
53 | private func date(_ date: Date, calendar: Calendar) async throws -> ActivitySnapshot {
| `- note: add @available attribute to enclosing instance method
54 | guard store.isHealthDataAvailable() else { throw HealthSnapError.notAvailable }
55 | guard let interval = CalendarDayRange.dayInterval(containing: date, calendar: calendar) else {
:
66 | let activeStats = try await statistics(for: .activeEnergyBurned, predicate: predicate)
67 | if activeStats != nil { sawData = true }
68 | let active = try await sum(from: activeStats, type: .activeEnergyBurned, unit: HKUnit.kilocalorie())
| |- error: 'activeEnergyBurned' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
69 |
70 | let basalStats = try await statistics(for: .basalEnergyBurned, predicate: predicate)
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/ActivityProvider.swift:68:88: error: 'HKUnit' is only available in macOS 13.0 or newer
4 | /// Fetches daily activity summaries (steps, energy, distance, exercise, stand).
5 | @MainActor
6 | public final class ActivityProvider {
| `- note: add @available attribute to enclosing class
7 | private let store: HealthStoreProtocol
8 |
:
51 | }
52 |
53 | private func date(_ date: Date, calendar: Calendar) async throws -> ActivitySnapshot {
| `- note: add @available attribute to enclosing instance method
54 | guard store.isHealthDataAvailable() else { throw HealthSnapError.notAvailable }
55 | guard let interval = CalendarDayRange.dayInterval(containing: date, calendar: calendar) else {
:
66 | let activeStats = try await statistics(for: .activeEnergyBurned, predicate: predicate)
67 | if activeStats != nil { sawData = true }
68 | let active = try await sum(from: activeStats, type: .activeEnergyBurned, unit: HKUnit.kilocalorie())
| |- error: 'HKUnit' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
69 |
70 | let basalStats = try await statistics(for: .basalEnergyBurned, predicate: predicate)
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/ActivityProvider.swift:70:53: error: 'basalEnergyBurned' is only available in macOS 13.0 or newer
4 | /// Fetches daily activity summaries (steps, energy, distance, exercise, stand).
5 | @MainActor
6 | public final class ActivityProvider {
| `- note: add @available attribute to enclosing class
7 | private let store: HealthStoreProtocol
8 |
:
51 | }
52 |
53 | private func date(_ date: Date, calendar: Calendar) async throws -> ActivitySnapshot {
| `- note: add @available attribute to enclosing instance method
54 | guard store.isHealthDataAvailable() else { throw HealthSnapError.notAvailable }
55 | guard let interval = CalendarDayRange.dayInterval(containing: date, calendar: calendar) else {
:
68 | let active = try await sum(from: activeStats, type: .activeEnergyBurned, unit: HKUnit.kilocalorie())
69 |
70 | let basalStats = try await statistics(for: .basalEnergyBurned, predicate: predicate)
| |- error: 'basalEnergyBurned' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
71 | if basalStats != nil { sawData = true }
72 | let basal = try await sum(from: basalStats, type: .basalEnergyBurned, unit: HKUnit.kilocalorie())
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/ActivityProvider.swift:72:60: error: 'basalEnergyBurned' is only available in macOS 13.0 or newer
4 | /// Fetches daily activity summaries (steps, energy, distance, exercise, stand).
5 | @MainActor
6 | public final class ActivityProvider {
| `- note: add @available attribute to enclosing class
7 | private let store: HealthStoreProtocol
8 |
:
51 | }
52 |
53 | private func date(_ date: Date, calendar: Calendar) async throws -> ActivitySnapshot {
| `- note: add @available attribute to enclosing instance method
54 | guard store.isHealthDataAvailable() else { throw HealthSnapError.notAvailable }
55 | guard let interval = CalendarDayRange.dayInterval(containing: date, calendar: calendar) else {
:
70 | let basalStats = try await statistics(for: .basalEnergyBurned, predicate: predicate)
71 | if basalStats != nil { sawData = true }
72 | let basal = try await sum(from: basalStats, type: .basalEnergyBurned, unit: HKUnit.kilocalorie())
| |- error: 'basalEnergyBurned' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
73 |
74 | let distanceStats = try await statistics(for: .distanceWalkingRunning, predicate: predicate)
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/ActivityProvider.swift:72:85: error: 'HKUnit' is only available in macOS 13.0 or newer
4 | /// Fetches daily activity summaries (steps, energy, distance, exercise, stand).
5 | @MainActor
6 | public final class ActivityProvider {
| `- note: add @available attribute to enclosing class
7 | private let store: HealthStoreProtocol
8 |
:
51 | }
52 |
53 | private func date(_ date: Date, calendar: Calendar) async throws -> ActivitySnapshot {
| `- note: add @available attribute to enclosing instance method
54 | guard store.isHealthDataAvailable() else { throw HealthSnapError.notAvailable }
55 | guard let interval = CalendarDayRange.dayInterval(containing: date, calendar: calendar) else {
:
70 | let basalStats = try await statistics(for: .basalEnergyBurned, predicate: predicate)
71 | if basalStats != nil { sawData = true }
72 | let basal = try await sum(from: basalStats, type: .basalEnergyBurned, unit: HKUnit.kilocalorie())
| |- error: 'HKUnit' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
73 |
74 | let distanceStats = try await statistics(for: .distanceWalkingRunning, predicate: predicate)
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/ActivityProvider.swift:74:56: error: 'distanceWalkingRunning' is only available in macOS 13.0 or newer
4 | /// Fetches daily activity summaries (steps, energy, distance, exercise, stand).
5 | @MainActor
6 | public final class ActivityProvider {
| `- note: add @available attribute to enclosing class
7 | private let store: HealthStoreProtocol
8 |
:
51 | }
52 |
53 | private func date(_ date: Date, calendar: Calendar) async throws -> ActivitySnapshot {
| `- note: add @available attribute to enclosing instance method
54 | guard store.isHealthDataAvailable() else { throw HealthSnapError.notAvailable }
55 | guard let interval = CalendarDayRange.dayInterval(containing: date, calendar: calendar) else {
:
72 | let basal = try await sum(from: basalStats, type: .basalEnergyBurned, unit: HKUnit.kilocalorie())
73 |
74 | let distanceStats = try await statistics(for: .distanceWalkingRunning, predicate: predicate)
| |- error: 'distanceWalkingRunning' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
75 | if distanceStats != nil { sawData = true }
76 | let distance = try await sum(from: distanceStats, type: .distanceWalkingRunning, unit: HKUnit.meter())
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/ActivityProvider.swift:76:66: error: 'distanceWalkingRunning' is only available in macOS 13.0 or newer
4 | /// Fetches daily activity summaries (steps, energy, distance, exercise, stand).
5 | @MainActor
6 | public final class ActivityProvider {
| `- note: add @available attribute to enclosing class
7 | private let store: HealthStoreProtocol
8 |
:
51 | }
52 |
53 | private func date(_ date: Date, calendar: Calendar) async throws -> ActivitySnapshot {
| `- note: add @available attribute to enclosing instance method
54 | guard store.isHealthDataAvailable() else { throw HealthSnapError.notAvailable }
55 | guard let interval = CalendarDayRange.dayInterval(containing: date, calendar: calendar) else {
:
74 | let distanceStats = try await statistics(for: .distanceWalkingRunning, predicate: predicate)
75 | if distanceStats != nil { sawData = true }
76 | let distance = try await sum(from: distanceStats, type: .distanceWalkingRunning, unit: HKUnit.meter())
| |- error: 'distanceWalkingRunning' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
77 |
78 | let exerciseStats = try await statistics(for: .appleExerciseTime, predicate: predicate)
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/ActivityProvider.swift:76:96: error: 'HKUnit' is only available in macOS 13.0 or newer
4 | /// Fetches daily activity summaries (steps, energy, distance, exercise, stand).
5 | @MainActor
6 | public final class ActivityProvider {
| `- note: add @available attribute to enclosing class
7 | private let store: HealthStoreProtocol
8 |
:
51 | }
52 |
53 | private func date(_ date: Date, calendar: Calendar) async throws -> ActivitySnapshot {
| `- note: add @available attribute to enclosing instance method
54 | guard store.isHealthDataAvailable() else { throw HealthSnapError.notAvailable }
55 | guard let interval = CalendarDayRange.dayInterval(containing: date, calendar: calendar) else {
:
74 | let distanceStats = try await statistics(for: .distanceWalkingRunning, predicate: predicate)
75 | if distanceStats != nil { sawData = true }
76 | let distance = try await sum(from: distanceStats, type: .distanceWalkingRunning, unit: HKUnit.meter())
| |- error: 'HKUnit' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
77 |
78 | let exerciseStats = try await statistics(for: .appleExerciseTime, predicate: predicate)
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/ActivityProvider.swift:78:56: error: 'appleExerciseTime' is only available in macOS 13.0 or newer
4 | /// Fetches daily activity summaries (steps, energy, distance, exercise, stand).
5 | @MainActor
6 | public final class ActivityProvider {
| `- note: add @available attribute to enclosing class
7 | private let store: HealthStoreProtocol
8 |
:
51 | }
52 |
53 | private func date(_ date: Date, calendar: Calendar) async throws -> ActivitySnapshot {
| `- note: add @available attribute to enclosing instance method
54 | guard store.isHealthDataAvailable() else { throw HealthSnapError.notAvailable }
55 | guard let interval = CalendarDayRange.dayInterval(containing: date, calendar: calendar) else {
:
76 | let distance = try await sum(from: distanceStats, type: .distanceWalkingRunning, unit: HKUnit.meter())
77 |
78 | let exerciseStats = try await statistics(for: .appleExerciseTime, predicate: predicate)
| |- error: 'appleExerciseTime' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
79 | if exerciseStats != nil { sawData = true }
80 | let exerciseMinutes = Int((try await sum(from: exerciseStats, type: .appleExerciseTime, unit: HKUnit.minute())).rounded())
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/ActivityProvider.swift:80:78: error: 'appleExerciseTime' is only available in macOS 13.0 or newer
4 | /// Fetches daily activity summaries (steps, energy, distance, exercise, stand).
5 | @MainActor
6 | public final class ActivityProvider {
| `- note: add @available attribute to enclosing class
7 | private let store: HealthStoreProtocol
8 |
:
51 | }
52 |
53 | private func date(_ date: Date, calendar: Calendar) async throws -> ActivitySnapshot {
| `- note: add @available attribute to enclosing instance method
54 | guard store.isHealthDataAvailable() else { throw HealthSnapError.notAvailable }
55 | guard let interval = CalendarDayRange.dayInterval(containing: date, calendar: calendar) else {
:
78 | let exerciseStats = try await statistics(for: .appleExerciseTime, predicate: predicate)
79 | if exerciseStats != nil { sawData = true }
80 | let exerciseMinutes = Int((try await sum(from: exerciseStats, type: .appleExerciseTime, unit: HKUnit.minute())).rounded())
| |- error: 'appleExerciseTime' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
81 |
82 | let standSamples = try await standHourSamples(predicate: predicate)
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/ActivityProvider.swift:80:103: error: 'HKUnit' is only available in macOS 13.0 or newer
4 | /// Fetches daily activity summaries (steps, energy, distance, exercise, stand).
5 | @MainActor
6 | public final class ActivityProvider {
| `- note: add @available attribute to enclosing class
7 | private let store: HealthStoreProtocol
8 |
:
51 | }
52 |
53 | private func date(_ date: Date, calendar: Calendar) async throws -> ActivitySnapshot {
| `- note: add @available attribute to enclosing instance method
54 | guard store.isHealthDataAvailable() else { throw HealthSnapError.notAvailable }
55 | guard let interval = CalendarDayRange.dayInterval(containing: date, calendar: calendar) else {
:
78 | let exerciseStats = try await statistics(for: .appleExerciseTime, predicate: predicate)
79 | if exerciseStats != nil { sawData = true }
80 | let exerciseMinutes = Int((try await sum(from: exerciseStats, type: .appleExerciseTime, unit: HKUnit.minute())).rounded())
| |- error: 'HKUnit' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
81 |
82 | let standSamples = try await standHourSamples(predicate: predicate)
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/ActivityProvider.swift:103:26: error: 'HKQuantityType' is only available in macOS 13.0 or newer
4 | /// Fetches daily activity summaries (steps, energy, distance, exercise, stand).
5 | @MainActor
6 | public final class ActivityProvider {
| `- note: add @available attribute to enclosing class
7 | private let store: HealthStoreProtocol
8 |
:
100 | }
101 |
102 | private func statistics(for identifier: HKQuantityTypeIdentifier, predicate: NSPredicate) async throws -> HKStatistics? {
| `- note: add @available attribute to enclosing instance method
103 | guard let type = HKQuantityType.quantityType(forIdentifier: identifier) else {
| |- error: 'HKQuantityType' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
104 | throw HealthSnapError.noData
105 | }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/ActivityProvider.swift:114:39: error: 'HKQuantityType' is only available in macOS 13.0 or newer
4 | /// Fetches daily activity summaries (steps, energy, distance, exercise, stand).
5 | @MainActor
6 | public final class ActivityProvider {
| `- note: add @available attribute to enclosing class
7 | private let store: HealthStoreProtocol
8 |
:
111 | }
112 |
113 | private func sum(from statistics: HKStatistics?, type identifier: HKQuantityTypeIdentifier, unit: HKUnit) async throws -> Double {
| `- note: add @available attribute to enclosing instance method
114 | guard let statistics, let _ = HKQuantityType.quantityType(forIdentifier: identifier) else {
| |- error: 'HKQuantityType' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
115 | return 0
116 | }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/ActivityProvider.swift:124:31: error: 'HKObjectType' is only available in macOS 13.0 or newer
4 | /// Fetches daily activity summaries (steps, energy, distance, exercise, stand).
5 | @MainActor
6 | public final class ActivityProvider {
| `- note: add @available attribute to enclosing class
7 | private let store: HealthStoreProtocol
8 |
:
121 | }
122 |
123 | private func standHourSamples(predicate: NSPredicate) async throws -> [HKCategorySample] {
| `- note: add @available attribute to enclosing instance method
124 | guard let standType = HKObjectType.categoryType(forIdentifier: .appleStandHour) else {
| |- error: 'HKObjectType' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
125 | return []
126 | }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/ActivityProvider.swift:124:73: error: 'appleStandHour' is only available in macOS 13.0 or newer
4 | /// Fetches daily activity summaries (steps, energy, distance, exercise, stand).
5 | @MainActor
6 | public final class ActivityProvider {
| `- note: add @available attribute to enclosing class
7 | private let store: HealthStoreProtocol
8 |
:
121 | }
122 |
123 | private func standHourSamples(predicate: NSPredicate) async throws -> [HKCategorySample] {
| `- note: add @available attribute to enclosing instance method
124 | guard let standType = HKObjectType.categoryType(forIdentifier: .appleStandHour) else {
| |- error: 'appleStandHour' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
125 | return []
126 | }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/ActivityProvider.swift:131:53: error: 'HKSampleSortIdentifierStartDate' is only available in macOS 13.0 or newer
4 | /// Fetches daily activity summaries (steps, energy, distance, exercise, stand).
5 | @MainActor
6 | public final class ActivityProvider {
| `- note: add @available attribute to enclosing class
7 | private let store: HealthStoreProtocol
8 |
:
121 | }
122 |
123 | private func standHourSamples(predicate: NSPredicate) async throws -> [HKCategorySample] {
| `- note: add @available attribute to enclosing instance method
124 | guard let standType = HKObjectType.categoryType(forIdentifier: .appleStandHour) else {
125 | return []
:
129 | predicate: predicate,
130 | limit: HKObjectQueryNoLimit,
131 | sortDescriptors: [NSSortDescriptor(key: HKSampleSortIdentifierStartDate, ascending: true)]
| |- error: 'HKSampleSortIdentifierStartDate' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
132 | )
133 | return raw.compactMap { $0 as? HKCategorySample }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/ActivityProvider.swift:133:40: error: 'HKCategorySample' is only available in macOS 13.0 or newer
4 | /// Fetches daily activity summaries (steps, energy, distance, exercise, stand).
5 | @MainActor
6 | public final class ActivityProvider {
| `- note: add @available attribute to enclosing class
7 | private let store: HealthStoreProtocol
8 |
:
121 | }
122 |
123 | private func standHourSamples(predicate: NSPredicate) async throws -> [HKCategorySample] {
| `- note: add @available attribute to enclosing instance method
124 | guard let standType = HKObjectType.categoryType(forIdentifier: .appleStandHour) else {
125 | return []
:
131 | sortDescriptors: [NSSortDescriptor(key: HKSampleSortIdentifierStartDate, ascending: true)]
132 | )
133 | return raw.compactMap { $0 as? HKCategorySample }
| |- error: 'HKCategorySample' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
134 | }
135 |
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/ActivityProvider.swift:138:29: error: 'HKCategoryValueAppleStandHour' is only available in macOS 13.0 or newer
4 | /// Fetches daily activity summaries (steps, energy, distance, exercise, stand).
5 | @MainActor
6 | public final class ActivityProvider {
| `- note: add @available attribute to enclosing class
7 | private let store: HealthStoreProtocol
8 |
:
134 | }
135 |
136 | private func countStoodHours(samples: [HKCategorySample]) -> Int {
| `- note: add @available attribute to enclosing instance method
137 | samples.filter { sample in
138 | sample.value == HKCategoryValueAppleStandHour.stood.rawValue
| |- error: 'HKCategoryValueAppleStandHour' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
139 | }.count
140 | }
[14/20] Compiling HealthSnapKit SleepAnalysisAggregator.swift
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/SleepAnalysisAggregator.swift:6:42: error: 'HKCategorySample' is only available in macOS 13.0 or newer
3 |
4 | /// Turns overlapping ``HKCategorySample`` sleep records into per-night ``SleepSnapshot`` values.
5 | enum SleepAnalysisAggregator {
| `- note: add @available attribute to enclosing enum
6 | static func snapshots(from samples: [HKCategorySample], calendar: Calendar) -> [SleepSnapshot] {
| | `- error: 'HKCategorySample' is only available in macOS 13.0 or newer
| `- note: add @available attribute to enclosing static method
7 | guard !samples.isEmpty else { return [] }
8 | let sorted = samples.sorted { $0.startDate < $1.startDate }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/SleepAnalysisAggregator.swift:14:50: error: 'HKCategorySample' is only available in macOS 13.0 or newer
3 |
4 | /// Turns overlapping ``HKCategorySample`` sleep records into per-night ``SleepSnapshot`` values.
5 | enum SleepAnalysisAggregator {
| `- note: add @available attribute to enclosing enum
6 | static func snapshots(from samples: [HKCategorySample], calendar: Calendar) -> [SleepSnapshot] {
7 | guard !samples.isEmpty else { return [] }
:
12 |
13 | /// Splits samples into sessions when there is a gap longer than four hours.
14 | private static func splitSessions(_ sorted: [HKCategorySample]) -> [[HKCategorySample]] {
| | `- error: 'HKCategorySample' is only available in macOS 13.0 or newer
| `- note: add @available attribute to enclosing static method
15 | var sessions: [[HKCategorySample]] = []
16 | var current: [HKCategorySample] = []
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/SleepAnalysisAggregator.swift:14:74: error: 'HKCategorySample' is only available in macOS 13.0 or newer
3 |
4 | /// Turns overlapping ``HKCategorySample`` sleep records into per-night ``SleepSnapshot`` values.
5 | enum SleepAnalysisAggregator {
| `- note: add @available attribute to enclosing enum
6 | static func snapshots(from samples: [HKCategorySample], calendar: Calendar) -> [SleepSnapshot] {
7 | guard !samples.isEmpty else { return [] }
:
12 |
13 | /// Splits samples into sessions when there is a gap longer than four hours.
14 | private static func splitSessions(_ sorted: [HKCategorySample]) -> [[HKCategorySample]] {
| | `- error: 'HKCategorySample' is only available in macOS 13.0 or newer
| `- note: add @available attribute to enclosing static method
15 | var sessions: [[HKCategorySample]] = []
16 | var current: [HKCategorySample] = []
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/SleepAnalysisAggregator.swift:32:49: error: 'HKCategorySample' is only available in macOS 13.0 or newer
3 |
4 | /// Turns overlapping ``HKCategorySample`` sleep records into per-night ``SleepSnapshot`` values.
5 | enum SleepAnalysisAggregator {
| `- note: add @available attribute to enclosing enum
6 | static func snapshots(from samples: [HKCategorySample], calendar: Calendar) -> [SleepSnapshot] {
7 | guard !samples.isEmpty else { return [] }
:
30 | }
31 |
32 | private static func buildSnapshot(samples: [HKCategorySample], calendar: Calendar) -> SleepSnapshot? {
| | `- error: 'HKCategorySample' is only available in macOS 13.0 or newer
| `- note: add @available attribute to enclosing static method
33 | var awake: TimeInterval = 0
34 | var rem: TimeInterval = 0
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/SleepAnalysisAggregator.swift:15:25: error: 'HKCategorySample' is only available in macOS 13.0 or newer
3 |
4 | /// Turns overlapping ``HKCategorySample`` sleep records into per-night ``SleepSnapshot`` values.
5 | enum SleepAnalysisAggregator {
| `- note: add @available attribute to enclosing enum
6 | static func snapshots(from samples: [HKCategorySample], calendar: Calendar) -> [SleepSnapshot] {
7 | guard !samples.isEmpty else { return [] }
:
12 |
13 | /// Splits samples into sessions when there is a gap longer than four hours.
14 | private static func splitSessions(_ sorted: [HKCategorySample]) -> [[HKCategorySample]] {
| `- note: add @available attribute to enclosing static method
15 | var sessions: [[HKCategorySample]] = []
| |- error: 'HKCategorySample' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
16 | var current: [HKCategorySample] = []
17 | let gap: TimeInterval = 4 * 3600
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/SleepAnalysisAggregator.swift:16:23: error: 'HKCategorySample' is only available in macOS 13.0 or newer
3 |
4 | /// Turns overlapping ``HKCategorySample`` sleep records into per-night ``SleepSnapshot`` values.
5 | enum SleepAnalysisAggregator {
| `- note: add @available attribute to enclosing enum
6 | static func snapshots(from samples: [HKCategorySample], calendar: Calendar) -> [SleepSnapshot] {
7 | guard !samples.isEmpty else { return [] }
:
12 |
13 | /// Splits samples into sessions when there is a gap longer than four hours.
14 | private static func splitSessions(_ sorted: [HKCategorySample]) -> [[HKCategorySample]] {
| `- note: add @available attribute to enclosing static method
15 | var sessions: [[HKCategorySample]] = []
16 | var current: [HKCategorySample] = []
| |- error: 'HKCategorySample' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
17 | let gap: TimeInterval = 4 * 3600
18 | for sample in sorted {
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/SleepAnalysisAggregator.swift:42:31: error: 'HKCategoryValueSleepAnalysis' is only available in macOS 13.0 or newer
3 |
4 | /// Turns overlapping ``HKCategorySample`` sleep records into per-night ``SleepSnapshot`` values.
5 | enum SleepAnalysisAggregator {
| `- note: add @available attribute to enclosing enum
6 | static func snapshots(from samples: [HKCategorySample], calendar: Calendar) -> [SleepSnapshot] {
7 | guard !samples.isEmpty else { return [] }
:
30 | }
31 |
32 | private static func buildSnapshot(samples: [HKCategorySample], calendar: Calendar) -> SleepSnapshot? {
| `- note: add @available attribute to enclosing static method
33 | var awake: TimeInterval = 0
34 | var rem: TimeInterval = 0
:
40 | for sample in samples {
41 | let duration = sample.endDate.timeIntervalSince(sample.startDate)
42 | guard let value = HKCategoryValueSleepAnalysis(rawValue: sample.value) else { continue }
| |- error: 'HKCategoryValueSleepAnalysis' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
43 | switch value {
44 | case .inBed:
[15/20] Compiling HealthSnapKit ActivitySnapshot.swift
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/SleepAnalysisAggregator.swift:6:42: error: 'HKCategorySample' is only available in macOS 13.0 or newer
3 |
4 | /// Turns overlapping ``HKCategorySample`` sleep records into per-night ``SleepSnapshot`` values.
5 | enum SleepAnalysisAggregator {
| `- note: add @available attribute to enclosing enum
6 | static func snapshots(from samples: [HKCategorySample], calendar: Calendar) -> [SleepSnapshot] {
| | `- error: 'HKCategorySample' is only available in macOS 13.0 or newer
| `- note: add @available attribute to enclosing static method
7 | guard !samples.isEmpty else { return [] }
8 | let sorted = samples.sorted { $0.startDate < $1.startDate }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/SleepAnalysisAggregator.swift:14:50: error: 'HKCategorySample' is only available in macOS 13.0 or newer
3 |
4 | /// Turns overlapping ``HKCategorySample`` sleep records into per-night ``SleepSnapshot`` values.
5 | enum SleepAnalysisAggregator {
| `- note: add @available attribute to enclosing enum
6 | static func snapshots(from samples: [HKCategorySample], calendar: Calendar) -> [SleepSnapshot] {
7 | guard !samples.isEmpty else { return [] }
:
12 |
13 | /// Splits samples into sessions when there is a gap longer than four hours.
14 | private static func splitSessions(_ sorted: [HKCategorySample]) -> [[HKCategorySample]] {
| | `- error: 'HKCategorySample' is only available in macOS 13.0 or newer
| `- note: add @available attribute to enclosing static method
15 | var sessions: [[HKCategorySample]] = []
16 | var current: [HKCategorySample] = []
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/SleepAnalysisAggregator.swift:14:74: error: 'HKCategorySample' is only available in macOS 13.0 or newer
3 |
4 | /// Turns overlapping ``HKCategorySample`` sleep records into per-night ``SleepSnapshot`` values.
5 | enum SleepAnalysisAggregator {
| `- note: add @available attribute to enclosing enum
6 | static func snapshots(from samples: [HKCategorySample], calendar: Calendar) -> [SleepSnapshot] {
7 | guard !samples.isEmpty else { return [] }
:
12 |
13 | /// Splits samples into sessions when there is a gap longer than four hours.
14 | private static func splitSessions(_ sorted: [HKCategorySample]) -> [[HKCategorySample]] {
| | `- error: 'HKCategorySample' is only available in macOS 13.0 or newer
| `- note: add @available attribute to enclosing static method
15 | var sessions: [[HKCategorySample]] = []
16 | var current: [HKCategorySample] = []
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/SleepAnalysisAggregator.swift:32:49: error: 'HKCategorySample' is only available in macOS 13.0 or newer
3 |
4 | /// Turns overlapping ``HKCategorySample`` sleep records into per-night ``SleepSnapshot`` values.
5 | enum SleepAnalysisAggregator {
| `- note: add @available attribute to enclosing enum
6 | static func snapshots(from samples: [HKCategorySample], calendar: Calendar) -> [SleepSnapshot] {
7 | guard !samples.isEmpty else { return [] }
:
30 | }
31 |
32 | private static func buildSnapshot(samples: [HKCategorySample], calendar: Calendar) -> SleepSnapshot? {
| | `- error: 'HKCategorySample' is only available in macOS 13.0 or newer
| `- note: add @available attribute to enclosing static method
33 | var awake: TimeInterval = 0
34 | var rem: TimeInterval = 0
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/SleepAnalysisAggregator.swift:15:25: error: 'HKCategorySample' is only available in macOS 13.0 or newer
3 |
4 | /// Turns overlapping ``HKCategorySample`` sleep records into per-night ``SleepSnapshot`` values.
5 | enum SleepAnalysisAggregator {
| `- note: add @available attribute to enclosing enum
6 | static func snapshots(from samples: [HKCategorySample], calendar: Calendar) -> [SleepSnapshot] {
7 | guard !samples.isEmpty else { return [] }
:
12 |
13 | /// Splits samples into sessions when there is a gap longer than four hours.
14 | private static func splitSessions(_ sorted: [HKCategorySample]) -> [[HKCategorySample]] {
| `- note: add @available attribute to enclosing static method
15 | var sessions: [[HKCategorySample]] = []
| |- error: 'HKCategorySample' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
16 | var current: [HKCategorySample] = []
17 | let gap: TimeInterval = 4 * 3600
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/SleepAnalysisAggregator.swift:16:23: error: 'HKCategorySample' is only available in macOS 13.0 or newer
3 |
4 | /// Turns overlapping ``HKCategorySample`` sleep records into per-night ``SleepSnapshot`` values.
5 | enum SleepAnalysisAggregator {
| `- note: add @available attribute to enclosing enum
6 | static func snapshots(from samples: [HKCategorySample], calendar: Calendar) -> [SleepSnapshot] {
7 | guard !samples.isEmpty else { return [] }
:
12 |
13 | /// Splits samples into sessions when there is a gap longer than four hours.
14 | private static func splitSessions(_ sorted: [HKCategorySample]) -> [[HKCategorySample]] {
| `- note: add @available attribute to enclosing static method
15 | var sessions: [[HKCategorySample]] = []
16 | var current: [HKCategorySample] = []
| |- error: 'HKCategorySample' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
17 | let gap: TimeInterval = 4 * 3600
18 | for sample in sorted {
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/SleepAnalysisAggregator.swift:42:31: error: 'HKCategoryValueSleepAnalysis' is only available in macOS 13.0 or newer
3 |
4 | /// Turns overlapping ``HKCategorySample`` sleep records into per-night ``SleepSnapshot`` values.
5 | enum SleepAnalysisAggregator {
| `- note: add @available attribute to enclosing enum
6 | static func snapshots(from samples: [HKCategorySample], calendar: Calendar) -> [SleepSnapshot] {
7 | guard !samples.isEmpty else { return [] }
:
30 | }
31 |
32 | private static func buildSnapshot(samples: [HKCategorySample], calendar: Calendar) -> SleepSnapshot? {
| `- note: add @available attribute to enclosing static method
33 | var awake: TimeInterval = 0
34 | var rem: TimeInterval = 0
:
40 | for sample in samples {
41 | let duration = sample.endDate.timeIntervalSince(sample.startDate)
42 | guard let value = HKCategoryValueSleepAnalysis(rawValue: sample.value) else { continue }
| |- error: 'HKCategoryValueSleepAnalysis' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
43 | switch value {
44 | case .inBed:
[16/20] Compiling HealthSnapKit HealthStoreProtocol.swift
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/HealthStoreProtocol.swift:11:22: error: 'HKSampleType' is only available in macOS 13.0 or newer
3 |
4 | /// Abstraction over ``HKHealthStore`` so production code and tests share the same query surface.
5 | public protocol HealthStoreProtocol: AnyObject {
| `- note: add @available attribute to enclosing protocol
6 | /// Whether HealthKit is available on this device.
7 | func isHealthDataAvailable() -> Bool
8 |
9 | /// Requests authorization to read and write the given types.
10 | func requestAuthorization(
| `- note: add @available attribute to enclosing instance method
11 | toShare: Set<HKSampleType>,
| `- error: 'HKSampleType' is only available in macOS 13.0 or newer
12 | read: Set<HKObjectType>,
13 | completion: @escaping @Sendable (Bool, Error?) -> Void
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/HealthStoreProtocol.swift:12:19: error: 'HKObjectType' is only available in macOS 13.0 or newer
3 |
4 | /// Abstraction over ``HKHealthStore`` so production code and tests share the same query surface.
5 | public protocol HealthStoreProtocol: AnyObject {
| `- note: add @available attribute to enclosing protocol
6 | /// Whether HealthKit is available on this device.
7 | func isHealthDataAvailable() -> Bool
8 |
9 | /// Requests authorization to read and write the given types.
10 | func requestAuthorization(
| `- note: add @available attribute to enclosing instance method
11 | toShare: Set<HKSampleType>,
12 | read: Set<HKObjectType>,
| `- error: 'HKObjectType' is only available in macOS 13.0 or newer
13 | completion: @escaping @Sendable (Bool, Error?) -> Void
14 | )
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/HealthStoreProtocol.swift:18:23: error: 'HKQuantityType' is only available in macOS 13.0 or newer
3 |
4 | /// Abstraction over ``HKHealthStore`` so production code and tests share the same query surface.
5 | public protocol HealthStoreProtocol: AnyObject {
| `- note: add @available attribute to enclosing protocol
6 | /// Whether HealthKit is available on this device.
7 | func isHealthDataAvailable() -> Bool
:
15 |
16 | /// Runs a statistics collection query and returns the resulting collection.
17 | func statisticsCollection(
| `- note: add @available attribute to enclosing instance method
18 | quantityType: HKQuantityType,
| `- error: 'HKQuantityType' is only available in macOS 13.0 or newer
19 | predicate: NSPredicate,
20 | options: HKStatisticsOptions,
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/HealthStoreProtocol.swift:20:18: error: 'HKStatisticsOptions' is only available in macOS 13.0 or newer
3 |
4 | /// Abstraction over ``HKHealthStore`` so production code and tests share the same query surface.
5 | public protocol HealthStoreProtocol: AnyObject {
| `- note: add @available attribute to enclosing protocol
6 | /// Whether HealthKit is available on this device.
7 | func isHealthDataAvailable() -> Bool
:
15 |
16 | /// Runs a statistics collection query and returns the resulting collection.
17 | func statisticsCollection(
| `- note: add @available attribute to enclosing instance method
18 | quantityType: HKQuantityType,
19 | predicate: NSPredicate,
20 | options: HKStatisticsOptions,
| `- error: 'HKStatisticsOptions' is only available in macOS 13.0 or newer
21 | anchorDate: Date,
22 | intervalComponents: DateComponents
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/HealthStoreProtocol.swift:23:23: error: 'HKStatisticsCollection' is only available in macOS 13.0 or newer
3 |
4 | /// Abstraction over ``HKHealthStore`` so production code and tests share the same query surface.
5 | public protocol HealthStoreProtocol: AnyObject {
| `- note: add @available attribute to enclosing protocol
6 | /// Whether HealthKit is available on this device.
7 | func isHealthDataAvailable() -> Bool
:
15 |
16 | /// Runs a statistics collection query and returns the resulting collection.
17 | func statisticsCollection(
| `- note: add @available attribute to enclosing instance method
18 | quantityType: HKQuantityType,
19 | predicate: NSPredicate,
:
21 | anchorDate: Date,
22 | intervalComponents: DateComponents
23 | ) async throws -> HKStatisticsCollection
| `- error: 'HKStatisticsCollection' is only available in macOS 13.0 or newer
24 |
25 | /// Runs a statistics query for a single interval.
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/HealthStoreProtocol.swift:27:23: error: 'HKQuantityType' is only available in macOS 13.0 or newer
3 |
4 | /// Abstraction over ``HKHealthStore`` so production code and tests share the same query surface.
5 | public protocol HealthStoreProtocol: AnyObject {
| `- note: add @available attribute to enclosing protocol
6 | /// Whether HealthKit is available on this device.
7 | func isHealthDataAvailable() -> Bool
:
24 |
25 | /// Runs a statistics query for a single interval.
26 | func statistics(
| `- note: add @available attribute to enclosing instance method
27 | quantityType: HKQuantityType,
| `- error: 'HKQuantityType' is only available in macOS 13.0 or newer
28 | predicate: NSPredicate,
29 | options: HKStatisticsOptions
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/HealthStoreProtocol.swift:29:18: error: 'HKStatisticsOptions' is only available in macOS 13.0 or newer
3 |
4 | /// Abstraction over ``HKHealthStore`` so production code and tests share the same query surface.
5 | public protocol HealthStoreProtocol: AnyObject {
| `- note: add @available attribute to enclosing protocol
6 | /// Whether HealthKit is available on this device.
7 | func isHealthDataAvailable() -> Bool
:
24 |
25 | /// Runs a statistics query for a single interval.
26 | func statistics(
| `- note: add @available attribute to enclosing instance method
27 | quantityType: HKQuantityType,
28 | predicate: NSPredicate,
29 | options: HKStatisticsOptions
| `- error: 'HKStatisticsOptions' is only available in macOS 13.0 or newer
30 | ) async throws -> HKStatistics?
31 |
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/HealthStoreProtocol.swift:30:23: error: 'HKStatistics' is only available in macOS 13.0 or newer
3 |
4 | /// Abstraction over ``HKHealthStore`` so production code and tests share the same query surface.
5 | public protocol HealthStoreProtocol: AnyObject {
| `- note: add @available attribute to enclosing protocol
6 | /// Whether HealthKit is available on this device.
7 | func isHealthDataAvailable() -> Bool
:
24 |
25 | /// Runs a statistics query for a single interval.
26 | func statistics(
| `- note: add @available attribute to enclosing instance method
27 | quantityType: HKQuantityType,
28 | predicate: NSPredicate,
29 | options: HKStatisticsOptions
30 | ) async throws -> HKStatistics?
| `- error: 'HKStatistics' is only available in macOS 13.0 or newer
31 |
32 | /// Runs a sample query and returns matching samples.
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/HealthStoreProtocol.swift:34:21: error: 'HKSampleType' is only available in macOS 13.0 or newer
3 |
4 | /// Abstraction over ``HKHealthStore`` so production code and tests share the same query surface.
5 | public protocol HealthStoreProtocol: AnyObject {
| `- note: add @available attribute to enclosing protocol
6 | /// Whether HealthKit is available on this device.
7 | func isHealthDataAvailable() -> Bool
:
31 |
32 | /// Runs a sample query and returns matching samples.
33 | func samples(
| `- note: add @available attribute to enclosing instance method
34 | sampleType: HKSampleType,
| `- error: 'HKSampleType' is only available in macOS 13.0 or newer
35 | predicate: NSPredicate,
36 | limit: Int,
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/HealthStoreProtocol.swift:38:24: error: 'HKSample' is only available in macOS 13.0 or newer
3 |
4 | /// Abstraction over ``HKHealthStore`` so production code and tests share the same query surface.
5 | public protocol HealthStoreProtocol: AnyObject {
| `- note: add @available attribute to enclosing protocol
6 | /// Whether HealthKit is available on this device.
7 | func isHealthDataAvailable() -> Bool
:
31 |
32 | /// Runs a sample query and returns matching samples.
33 | func samples(
| `- note: add @available attribute to enclosing instance method
34 | sampleType: HKSampleType,
35 | predicate: NSPredicate,
36 | limit: Int,
37 | sortDescriptors: [NSSortDescriptor]
38 | ) async throws -> [HKSample]
| `- error: 'HKSample' is only available in macOS 13.0 or newer
39 | }
40 |
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/LiveHealthStore.swift:6:24: error: 'HKHealthStore' is only available in macOS 13.0 or newer
3 |
4 | /// Default ``HealthStoreProtocol`` implementation backed by ``HKHealthStore``.
5 | public final class LiveHealthStore: HealthStoreProtocol {
| `- note: add @available attribute to enclosing class
6 | private let store: HKHealthStore
| `- error: 'HKHealthStore' is only available in macOS 13.0 or newer
7 |
8 | /// Creates a store that wraps the shared HealthKit store.
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/LiveHealthStore.swift:9:24: error: 'HKHealthStore' is only available in macOS 13.0 or newer
3 |
4 | /// Default ``HealthStoreProtocol`` implementation backed by ``HKHealthStore``.
5 | public final class LiveHealthStore: HealthStoreProtocol {
| `- note: add @available attribute to enclosing class
6 | private let store: HKHealthStore
7 |
8 | /// Creates a store that wraps the shared HealthKit store.
9 | public init(store: HKHealthStore = HKHealthStore()) {
| | `- error: 'HKHealthStore' is only available in macOS 13.0 or newer
| `- note: add @available attribute to enclosing initializer
10 | self.store = store
11 | }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/LiveHealthStore.swift:9:40: error: 'HKHealthStore' is only available in macOS 13.0 or newer
3 |
4 | /// Default ``HealthStoreProtocol`` implementation backed by ``HKHealthStore``.
5 | public final class LiveHealthStore: HealthStoreProtocol {
| `- note: add @available attribute to enclosing class
6 | private let store: HKHealthStore
7 |
8 | /// Creates a store that wraps the shared HealthKit store.
9 | public init(store: HKHealthStore = HKHealthStore()) {
| | `- error: 'HKHealthStore' is only available in macOS 13.0 or newer
| `- note: add @available attribute to enclosing initializer
10 | self.store = store
11 | }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/LiveHealthStore.swift:18:22: error: 'HKSampleType' is only available in macOS 13.0 or newer
3 |
4 | /// Default ``HealthStoreProtocol`` implementation backed by ``HKHealthStore``.
5 | public final class LiveHealthStore: HealthStoreProtocol {
| `- note: add @available attribute to enclosing class
6 | private let store: HKHealthStore
7 |
:
15 | }
16 |
17 | public func requestAuthorization(
| `- note: add @available attribute to enclosing instance method
18 | toShare: Set<HKSampleType>,
| `- error: 'HKSampleType' is only available in macOS 13.0 or newer
19 | read: Set<HKObjectType>,
20 | completion: @escaping @Sendable (Bool, Error?) -> Void
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/LiveHealthStore.swift:19:19: error: 'HKObjectType' is only available in macOS 13.0 or newer
3 |
4 | /// Default ``HealthStoreProtocol`` implementation backed by ``HKHealthStore``.
5 | public final class LiveHealthStore: HealthStoreProtocol {
| `- note: add @available attribute to enclosing class
6 | private let store: HKHealthStore
7 |
:
15 | }
16 |
17 | public func requestAuthorization(
| `- note: add @available attribute to enclosing instance method
18 | toShare: Set<HKSampleType>,
19 | read: Set<HKObjectType>,
| `- error: 'HKObjectType' is only available in macOS 13.0 or newer
20 | completion: @escaping @Sendable (Bool, Error?) -> Void
21 | ) {
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/LiveHealthStore.swift:26:23: error: 'HKQuantityType' is only available in macOS 13.0 or newer
3 |
4 | /// Default ``HealthStoreProtocol`` implementation backed by ``HKHealthStore``.
5 | public final class LiveHealthStore: HealthStoreProtocol {
| `- note: add @available attribute to enclosing class
6 | private let store: HKHealthStore
7 |
:
23 | }
24 |
25 | public func statisticsCollection(
| `- note: add @available attribute to enclosing instance method
26 | quantityType: HKQuantityType,
| `- error: 'HKQuantityType' is only available in macOS 13.0 or newer
27 | predicate: NSPredicate,
28 | options: HKStatisticsOptions,
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/LiveHealthStore.swift:28:18: error: 'HKStatisticsOptions' is only available in macOS 13.0 or newer
3 |
4 | /// Default ``HealthStoreProtocol`` implementation backed by ``HKHealthStore``.
5 | public final class LiveHealthStore: HealthStoreProtocol {
| `- note: add @available attribute to enclosing class
6 | private let store: HKHealthStore
7 |
:
23 | }
24 |
25 | public func statisticsCollection(
| `- note: add @available attribute to enclosing instance method
26 | quantityType: HKQuantityType,
27 | predicate: NSPredicate,
28 | options: HKStatisticsOptions,
| `- error: 'HKStatisticsOptions' is only available in macOS 13.0 or newer
29 | anchorDate: Date,
30 | intervalComponents: DateComponents
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/LiveHealthStore.swift:31:23: error: 'HKStatisticsCollection' is only available in macOS 13.0 or newer
3 |
4 | /// Default ``HealthStoreProtocol`` implementation backed by ``HKHealthStore``.
5 | public final class LiveHealthStore: HealthStoreProtocol {
| `- note: add @available attribute to enclosing class
6 | private let store: HKHealthStore
7 |
:
23 | }
24 |
25 | public func statisticsCollection(
| `- note: add @available attribute to enclosing instance method
26 | quantityType: HKQuantityType,
27 | predicate: NSPredicate,
:
29 | anchorDate: Date,
30 | intervalComponents: DateComponents
31 | ) async throws -> HKStatisticsCollection {
| `- error: 'HKStatisticsCollection' is only available in macOS 13.0 or newer
32 | try await HKQueryAsync.statisticsCollection(
33 | store: store,
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/LiveHealthStore.swift:43:23: error: 'HKQuantityType' is only available in macOS 13.0 or newer
3 |
4 | /// Default ``HealthStoreProtocol`` implementation backed by ``HKHealthStore``.
5 | public final class LiveHealthStore: HealthStoreProtocol {
| `- note: add @available attribute to enclosing class
6 | private let store: HKHealthStore
7 |
:
40 | }
41 |
42 | public func statistics(
| `- note: add @available attribute to enclosing instance method
43 | quantityType: HKQuantityType,
| `- error: 'HKQuantityType' is only available in macOS 13.0 or newer
44 | predicate: NSPredicate,
45 | options: HKStatisticsOptions
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/LiveHealthStore.swift:45:18: error: 'HKStatisticsOptions' is only available in macOS 13.0 or newer
3 |
4 | /// Default ``HealthStoreProtocol`` implementation backed by ``HKHealthStore``.
5 | public final class LiveHealthStore: HealthStoreProtocol {
| `- note: add @available attribute to enclosing class
6 | private let store: HKHealthStore
7 |
:
40 | }
41 |
42 | public func statistics(
| `- note: add @available attribute to enclosing instance method
43 | quantityType: HKQuantityType,
44 | predicate: NSPredicate,
45 | options: HKStatisticsOptions
| `- error: 'HKStatisticsOptions' is only available in macOS 13.0 or newer
46 | ) async throws -> HKStatistics? {
47 | try await HKQueryAsync.statistics(
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/LiveHealthStore.swift:46:23: error: 'HKStatistics' is only available in macOS 13.0 or newer
3 |
4 | /// Default ``HealthStoreProtocol`` implementation backed by ``HKHealthStore``.
5 | public final class LiveHealthStore: HealthStoreProtocol {
| `- note: add @available attribute to enclosing class
6 | private let store: HKHealthStore
7 |
:
40 | }
41 |
42 | public func statistics(
| `- note: add @available attribute to enclosing instance method
43 | quantityType: HKQuantityType,
44 | predicate: NSPredicate,
45 | options: HKStatisticsOptions
46 | ) async throws -> HKStatistics? {
| `- error: 'HKStatistics' is only available in macOS 13.0 or newer
47 | try await HKQueryAsync.statistics(
48 | store: store,
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/LiveHealthStore.swift:56:21: error: 'HKSampleType' is only available in macOS 13.0 or newer
3 |
4 | /// Default ``HealthStoreProtocol`` implementation backed by ``HKHealthStore``.
5 | public final class LiveHealthStore: HealthStoreProtocol {
| `- note: add @available attribute to enclosing class
6 | private let store: HKHealthStore
7 |
:
53 | }
54 |
55 | public func samples(
| `- note: add @available attribute to enclosing instance method
56 | sampleType: HKSampleType,
| `- error: 'HKSampleType' is only available in macOS 13.0 or newer
57 | predicate: NSPredicate,
58 | limit: Int,
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/LiveHealthStore.swift:60:24: error: 'HKSample' is only available in macOS 13.0 or newer
3 |
4 | /// Default ``HealthStoreProtocol`` implementation backed by ``HKHealthStore``.
5 | public final class LiveHealthStore: HealthStoreProtocol {
| `- note: add @available attribute to enclosing class
6 | private let store: HKHealthStore
7 |
:
53 | }
54 |
55 | public func samples(
| `- note: add @available attribute to enclosing instance method
56 | sampleType: HKSampleType,
57 | predicate: NSPredicate,
58 | limit: Int,
59 | sortDescriptors: [NSSortDescriptor]
60 | ) async throws -> [HKSample] {
| `- error: 'HKSample' is only available in macOS 13.0 or newer
61 | try await HKQueryAsync.samples(
62 | store: store,
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/LiveHealthStore.swift:14:9: error: 'HKHealthStore' is only available in macOS 13.0 or newer
3 |
4 | /// Default ``HealthStoreProtocol`` implementation backed by ``HKHealthStore``.
5 | public final class LiveHealthStore: HealthStoreProtocol {
| `- note: add @available attribute to enclosing class
6 | private let store: HKHealthStore
7 |
:
11 | }
12 |
13 | public func isHealthDataAvailable() -> Bool {
| `- note: add @available attribute to enclosing instance method
14 | HKHealthStore.isHealthDataAvailable()
| |- error: 'HKHealthStore' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
15 | }
16 |
[17/20] Compiling HealthSnapKit LiveHealthStore.swift
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/HealthStoreProtocol.swift:11:22: error: 'HKSampleType' is only available in macOS 13.0 or newer
3 |
4 | /// Abstraction over ``HKHealthStore`` so production code and tests share the same query surface.
5 | public protocol HealthStoreProtocol: AnyObject {
| `- note: add @available attribute to enclosing protocol
6 | /// Whether HealthKit is available on this device.
7 | func isHealthDataAvailable() -> Bool
8 |
9 | /// Requests authorization to read and write the given types.
10 | func requestAuthorization(
| `- note: add @available attribute to enclosing instance method
11 | toShare: Set<HKSampleType>,
| `- error: 'HKSampleType' is only available in macOS 13.0 or newer
12 | read: Set<HKObjectType>,
13 | completion: @escaping @Sendable (Bool, Error?) -> Void
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/HealthStoreProtocol.swift:12:19: error: 'HKObjectType' is only available in macOS 13.0 or newer
3 |
4 | /// Abstraction over ``HKHealthStore`` so production code and tests share the same query surface.
5 | public protocol HealthStoreProtocol: AnyObject {
| `- note: add @available attribute to enclosing protocol
6 | /// Whether HealthKit is available on this device.
7 | func isHealthDataAvailable() -> Bool
8 |
9 | /// Requests authorization to read and write the given types.
10 | func requestAuthorization(
| `- note: add @available attribute to enclosing instance method
11 | toShare: Set<HKSampleType>,
12 | read: Set<HKObjectType>,
| `- error: 'HKObjectType' is only available in macOS 13.0 or newer
13 | completion: @escaping @Sendable (Bool, Error?) -> Void
14 | )
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/HealthStoreProtocol.swift:18:23: error: 'HKQuantityType' is only available in macOS 13.0 or newer
3 |
4 | /// Abstraction over ``HKHealthStore`` so production code and tests share the same query surface.
5 | public protocol HealthStoreProtocol: AnyObject {
| `- note: add @available attribute to enclosing protocol
6 | /// Whether HealthKit is available on this device.
7 | func isHealthDataAvailable() -> Bool
:
15 |
16 | /// Runs a statistics collection query and returns the resulting collection.
17 | func statisticsCollection(
| `- note: add @available attribute to enclosing instance method
18 | quantityType: HKQuantityType,
| `- error: 'HKQuantityType' is only available in macOS 13.0 or newer
19 | predicate: NSPredicate,
20 | options: HKStatisticsOptions,
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/HealthStoreProtocol.swift:20:18: error: 'HKStatisticsOptions' is only available in macOS 13.0 or newer
3 |
4 | /// Abstraction over ``HKHealthStore`` so production code and tests share the same query surface.
5 | public protocol HealthStoreProtocol: AnyObject {
| `- note: add @available attribute to enclosing protocol
6 | /// Whether HealthKit is available on this device.
7 | func isHealthDataAvailable() -> Bool
:
15 |
16 | /// Runs a statistics collection query and returns the resulting collection.
17 | func statisticsCollection(
| `- note: add @available attribute to enclosing instance method
18 | quantityType: HKQuantityType,
19 | predicate: NSPredicate,
20 | options: HKStatisticsOptions,
| `- error: 'HKStatisticsOptions' is only available in macOS 13.0 or newer
21 | anchorDate: Date,
22 | intervalComponents: DateComponents
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/HealthStoreProtocol.swift:23:23: error: 'HKStatisticsCollection' is only available in macOS 13.0 or newer
3 |
4 | /// Abstraction over ``HKHealthStore`` so production code and tests share the same query surface.
5 | public protocol HealthStoreProtocol: AnyObject {
| `- note: add @available attribute to enclosing protocol
6 | /// Whether HealthKit is available on this device.
7 | func isHealthDataAvailable() -> Bool
:
15 |
16 | /// Runs a statistics collection query and returns the resulting collection.
17 | func statisticsCollection(
| `- note: add @available attribute to enclosing instance method
18 | quantityType: HKQuantityType,
19 | predicate: NSPredicate,
:
21 | anchorDate: Date,
22 | intervalComponents: DateComponents
23 | ) async throws -> HKStatisticsCollection
| `- error: 'HKStatisticsCollection' is only available in macOS 13.0 or newer
24 |
25 | /// Runs a statistics query for a single interval.
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/HealthStoreProtocol.swift:27:23: error: 'HKQuantityType' is only available in macOS 13.0 or newer
3 |
4 | /// Abstraction over ``HKHealthStore`` so production code and tests share the same query surface.
5 | public protocol HealthStoreProtocol: AnyObject {
| `- note: add @available attribute to enclosing protocol
6 | /// Whether HealthKit is available on this device.
7 | func isHealthDataAvailable() -> Bool
:
24 |
25 | /// Runs a statistics query for a single interval.
26 | func statistics(
| `- note: add @available attribute to enclosing instance method
27 | quantityType: HKQuantityType,
| `- error: 'HKQuantityType' is only available in macOS 13.0 or newer
28 | predicate: NSPredicate,
29 | options: HKStatisticsOptions
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/HealthStoreProtocol.swift:29:18: error: 'HKStatisticsOptions' is only available in macOS 13.0 or newer
3 |
4 | /// Abstraction over ``HKHealthStore`` so production code and tests share the same query surface.
5 | public protocol HealthStoreProtocol: AnyObject {
| `- note: add @available attribute to enclosing protocol
6 | /// Whether HealthKit is available on this device.
7 | func isHealthDataAvailable() -> Bool
:
24 |
25 | /// Runs a statistics query for a single interval.
26 | func statistics(
| `- note: add @available attribute to enclosing instance method
27 | quantityType: HKQuantityType,
28 | predicate: NSPredicate,
29 | options: HKStatisticsOptions
| `- error: 'HKStatisticsOptions' is only available in macOS 13.0 or newer
30 | ) async throws -> HKStatistics?
31 |
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/HealthStoreProtocol.swift:30:23: error: 'HKStatistics' is only available in macOS 13.0 or newer
3 |
4 | /// Abstraction over ``HKHealthStore`` so production code and tests share the same query surface.
5 | public protocol HealthStoreProtocol: AnyObject {
| `- note: add @available attribute to enclosing protocol
6 | /// Whether HealthKit is available on this device.
7 | func isHealthDataAvailable() -> Bool
:
24 |
25 | /// Runs a statistics query for a single interval.
26 | func statistics(
| `- note: add @available attribute to enclosing instance method
27 | quantityType: HKQuantityType,
28 | predicate: NSPredicate,
29 | options: HKStatisticsOptions
30 | ) async throws -> HKStatistics?
| `- error: 'HKStatistics' is only available in macOS 13.0 or newer
31 |
32 | /// Runs a sample query and returns matching samples.
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/HealthStoreProtocol.swift:34:21: error: 'HKSampleType' is only available in macOS 13.0 or newer
3 |
4 | /// Abstraction over ``HKHealthStore`` so production code and tests share the same query surface.
5 | public protocol HealthStoreProtocol: AnyObject {
| `- note: add @available attribute to enclosing protocol
6 | /// Whether HealthKit is available on this device.
7 | func isHealthDataAvailable() -> Bool
:
31 |
32 | /// Runs a sample query and returns matching samples.
33 | func samples(
| `- note: add @available attribute to enclosing instance method
34 | sampleType: HKSampleType,
| `- error: 'HKSampleType' is only available in macOS 13.0 or newer
35 | predicate: NSPredicate,
36 | limit: Int,
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/HealthStoreProtocol.swift:38:24: error: 'HKSample' is only available in macOS 13.0 or newer
3 |
4 | /// Abstraction over ``HKHealthStore`` so production code and tests share the same query surface.
5 | public protocol HealthStoreProtocol: AnyObject {
| `- note: add @available attribute to enclosing protocol
6 | /// Whether HealthKit is available on this device.
7 | func isHealthDataAvailable() -> Bool
:
31 |
32 | /// Runs a sample query and returns matching samples.
33 | func samples(
| `- note: add @available attribute to enclosing instance method
34 | sampleType: HKSampleType,
35 | predicate: NSPredicate,
36 | limit: Int,
37 | sortDescriptors: [NSSortDescriptor]
38 | ) async throws -> [HKSample]
| `- error: 'HKSample' is only available in macOS 13.0 or newer
39 | }
40 |
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/LiveHealthStore.swift:6:24: error: 'HKHealthStore' is only available in macOS 13.0 or newer
3 |
4 | /// Default ``HealthStoreProtocol`` implementation backed by ``HKHealthStore``.
5 | public final class LiveHealthStore: HealthStoreProtocol {
| `- note: add @available attribute to enclosing class
6 | private let store: HKHealthStore
| `- error: 'HKHealthStore' is only available in macOS 13.0 or newer
7 |
8 | /// Creates a store that wraps the shared HealthKit store.
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/LiveHealthStore.swift:9:24: error: 'HKHealthStore' is only available in macOS 13.0 or newer
3 |
4 | /// Default ``HealthStoreProtocol`` implementation backed by ``HKHealthStore``.
5 | public final class LiveHealthStore: HealthStoreProtocol {
| `- note: add @available attribute to enclosing class
6 | private let store: HKHealthStore
7 |
8 | /// Creates a store that wraps the shared HealthKit store.
9 | public init(store: HKHealthStore = HKHealthStore()) {
| | `- error: 'HKHealthStore' is only available in macOS 13.0 or newer
| `- note: add @available attribute to enclosing initializer
10 | self.store = store
11 | }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/LiveHealthStore.swift:9:40: error: 'HKHealthStore' is only available in macOS 13.0 or newer
3 |
4 | /// Default ``HealthStoreProtocol`` implementation backed by ``HKHealthStore``.
5 | public final class LiveHealthStore: HealthStoreProtocol {
| `- note: add @available attribute to enclosing class
6 | private let store: HKHealthStore
7 |
8 | /// Creates a store that wraps the shared HealthKit store.
9 | public init(store: HKHealthStore = HKHealthStore()) {
| | `- error: 'HKHealthStore' is only available in macOS 13.0 or newer
| `- note: add @available attribute to enclosing initializer
10 | self.store = store
11 | }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/LiveHealthStore.swift:18:22: error: 'HKSampleType' is only available in macOS 13.0 or newer
3 |
4 | /// Default ``HealthStoreProtocol`` implementation backed by ``HKHealthStore``.
5 | public final class LiveHealthStore: HealthStoreProtocol {
| `- note: add @available attribute to enclosing class
6 | private let store: HKHealthStore
7 |
:
15 | }
16 |
17 | public func requestAuthorization(
| `- note: add @available attribute to enclosing instance method
18 | toShare: Set<HKSampleType>,
| `- error: 'HKSampleType' is only available in macOS 13.0 or newer
19 | read: Set<HKObjectType>,
20 | completion: @escaping @Sendable (Bool, Error?) -> Void
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/LiveHealthStore.swift:19:19: error: 'HKObjectType' is only available in macOS 13.0 or newer
3 |
4 | /// Default ``HealthStoreProtocol`` implementation backed by ``HKHealthStore``.
5 | public final class LiveHealthStore: HealthStoreProtocol {
| `- note: add @available attribute to enclosing class
6 | private let store: HKHealthStore
7 |
:
15 | }
16 |
17 | public func requestAuthorization(
| `- note: add @available attribute to enclosing instance method
18 | toShare: Set<HKSampleType>,
19 | read: Set<HKObjectType>,
| `- error: 'HKObjectType' is only available in macOS 13.0 or newer
20 | completion: @escaping @Sendable (Bool, Error?) -> Void
21 | ) {
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/LiveHealthStore.swift:26:23: error: 'HKQuantityType' is only available in macOS 13.0 or newer
3 |
4 | /// Default ``HealthStoreProtocol`` implementation backed by ``HKHealthStore``.
5 | public final class LiveHealthStore: HealthStoreProtocol {
| `- note: add @available attribute to enclosing class
6 | private let store: HKHealthStore
7 |
:
23 | }
24 |
25 | public func statisticsCollection(
| `- note: add @available attribute to enclosing instance method
26 | quantityType: HKQuantityType,
| `- error: 'HKQuantityType' is only available in macOS 13.0 or newer
27 | predicate: NSPredicate,
28 | options: HKStatisticsOptions,
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/LiveHealthStore.swift:28:18: error: 'HKStatisticsOptions' is only available in macOS 13.0 or newer
3 |
4 | /// Default ``HealthStoreProtocol`` implementation backed by ``HKHealthStore``.
5 | public final class LiveHealthStore: HealthStoreProtocol {
| `- note: add @available attribute to enclosing class
6 | private let store: HKHealthStore
7 |
:
23 | }
24 |
25 | public func statisticsCollection(
| `- note: add @available attribute to enclosing instance method
26 | quantityType: HKQuantityType,
27 | predicate: NSPredicate,
28 | options: HKStatisticsOptions,
| `- error: 'HKStatisticsOptions' is only available in macOS 13.0 or newer
29 | anchorDate: Date,
30 | intervalComponents: DateComponents
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/LiveHealthStore.swift:31:23: error: 'HKStatisticsCollection' is only available in macOS 13.0 or newer
3 |
4 | /// Default ``HealthStoreProtocol`` implementation backed by ``HKHealthStore``.
5 | public final class LiveHealthStore: HealthStoreProtocol {
| `- note: add @available attribute to enclosing class
6 | private let store: HKHealthStore
7 |
:
23 | }
24 |
25 | public func statisticsCollection(
| `- note: add @available attribute to enclosing instance method
26 | quantityType: HKQuantityType,
27 | predicate: NSPredicate,
:
29 | anchorDate: Date,
30 | intervalComponents: DateComponents
31 | ) async throws -> HKStatisticsCollection {
| `- error: 'HKStatisticsCollection' is only available in macOS 13.0 or newer
32 | try await HKQueryAsync.statisticsCollection(
33 | store: store,
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/LiveHealthStore.swift:43:23: error: 'HKQuantityType' is only available in macOS 13.0 or newer
3 |
4 | /// Default ``HealthStoreProtocol`` implementation backed by ``HKHealthStore``.
5 | public final class LiveHealthStore: HealthStoreProtocol {
| `- note: add @available attribute to enclosing class
6 | private let store: HKHealthStore
7 |
:
40 | }
41 |
42 | public func statistics(
| `- note: add @available attribute to enclosing instance method
43 | quantityType: HKQuantityType,
| `- error: 'HKQuantityType' is only available in macOS 13.0 or newer
44 | predicate: NSPredicate,
45 | options: HKStatisticsOptions
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/LiveHealthStore.swift:45:18: error: 'HKStatisticsOptions' is only available in macOS 13.0 or newer
3 |
4 | /// Default ``HealthStoreProtocol`` implementation backed by ``HKHealthStore``.
5 | public final class LiveHealthStore: HealthStoreProtocol {
| `- note: add @available attribute to enclosing class
6 | private let store: HKHealthStore
7 |
:
40 | }
41 |
42 | public func statistics(
| `- note: add @available attribute to enclosing instance method
43 | quantityType: HKQuantityType,
44 | predicate: NSPredicate,
45 | options: HKStatisticsOptions
| `- error: 'HKStatisticsOptions' is only available in macOS 13.0 or newer
46 | ) async throws -> HKStatistics? {
47 | try await HKQueryAsync.statistics(
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/LiveHealthStore.swift:46:23: error: 'HKStatistics' is only available in macOS 13.0 or newer
3 |
4 | /// Default ``HealthStoreProtocol`` implementation backed by ``HKHealthStore``.
5 | public final class LiveHealthStore: HealthStoreProtocol {
| `- note: add @available attribute to enclosing class
6 | private let store: HKHealthStore
7 |
:
40 | }
41 |
42 | public func statistics(
| `- note: add @available attribute to enclosing instance method
43 | quantityType: HKQuantityType,
44 | predicate: NSPredicate,
45 | options: HKStatisticsOptions
46 | ) async throws -> HKStatistics? {
| `- error: 'HKStatistics' is only available in macOS 13.0 or newer
47 | try await HKQueryAsync.statistics(
48 | store: store,
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/LiveHealthStore.swift:56:21: error: 'HKSampleType' is only available in macOS 13.0 or newer
3 |
4 | /// Default ``HealthStoreProtocol`` implementation backed by ``HKHealthStore``.
5 | public final class LiveHealthStore: HealthStoreProtocol {
| `- note: add @available attribute to enclosing class
6 | private let store: HKHealthStore
7 |
:
53 | }
54 |
55 | public func samples(
| `- note: add @available attribute to enclosing instance method
56 | sampleType: HKSampleType,
| `- error: 'HKSampleType' is only available in macOS 13.0 or newer
57 | predicate: NSPredicate,
58 | limit: Int,
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/LiveHealthStore.swift:60:24: error: 'HKSample' is only available in macOS 13.0 or newer
3 |
4 | /// Default ``HealthStoreProtocol`` implementation backed by ``HKHealthStore``.
5 | public final class LiveHealthStore: HealthStoreProtocol {
| `- note: add @available attribute to enclosing class
6 | private let store: HKHealthStore
7 |
:
53 | }
54 |
55 | public func samples(
| `- note: add @available attribute to enclosing instance method
56 | sampleType: HKSampleType,
57 | predicate: NSPredicate,
58 | limit: Int,
59 | sortDescriptors: [NSSortDescriptor]
60 | ) async throws -> [HKSample] {
| `- error: 'HKSample' is only available in macOS 13.0 or newer
61 | try await HKQueryAsync.samples(
62 | store: store,
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/LiveHealthStore.swift:14:9: error: 'HKHealthStore' is only available in macOS 13.0 or newer
3 |
4 | /// Default ``HealthStoreProtocol`` implementation backed by ``HKHealthStore``.
5 | public final class LiveHealthStore: HealthStoreProtocol {
| `- note: add @available attribute to enclosing class
6 | private let store: HKHealthStore
7 |
:
11 | }
12 |
13 | public func isHealthDataAvailable() -> Bool {
| `- note: add @available attribute to enclosing instance method
14 | HKHealthStore.isHealthDataAvailable()
| |- error: 'HKHealthStore' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
15 | }
16 |
[18/20] Compiling HealthSnapKit HealthKitPermissions.swift
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Authorization/HealthKitPermissions.swift:19:79: error: 'HKObjectType' is only available in macOS 13.0 or newer
15 |
16 | /// Maps ``HealthDataDomain`` values to concrete HealthKit object types for authorization.
17 | public enum HealthKitPermissions: Sendable {
| `- note: add @available attribute to enclosing enum
18 | /// All sample and object types required to read data for the given domains.
19 | public static func objectTypes(for domains: Set<HealthDataDomain>) -> Set<HKObjectType> {
| | `- error: 'HKObjectType' is only available in macOS 13.0 or newer
| `- note: add @available attribute to enclosing static method
20 | var types = Set<HKObjectType>()
21 | for domain in domains {
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Authorization/HealthKitPermissions.swift:38:52: error: 'HKObjectType' is only available in macOS 13.0 or newer
15 |
16 | /// Maps ``HealthDataDomain`` values to concrete HealthKit object types for authorization.
17 | public enum HealthKitPermissions: Sendable {
| `- note: add @available attribute to enclosing enum
18 | /// All sample and object types required to read data for the given domains.
19 | public static func objectTypes(for domains: Set<HealthDataDomain>) -> Set<HKObjectType> {
:
36 | }
37 |
38 | private static func activityReadTypes() -> Set<HKObjectType> {
| | `- error: 'HKObjectType' is only available in macOS 13.0 or newer
| `- note: add @available attribute to enclosing static method
39 | var set = Set<HKObjectType>()
40 | if let t = HKObjectType.quantityType(forIdentifier: .stepCount) { set.insert(t) }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Authorization/HealthKitPermissions.swift:49:49: error: 'HKObjectType' is only available in macOS 13.0 or newer
15 |
16 | /// Maps ``HealthDataDomain`` values to concrete HealthKit object types for authorization.
17 | public enum HealthKitPermissions: Sendable {
| `- note: add @available attribute to enclosing enum
18 | /// All sample and object types required to read data for the given domains.
19 | public static func objectTypes(for domains: Set<HealthDataDomain>) -> Set<HKObjectType> {
:
47 | }
48 |
49 | private static func heartReadTypes() -> Set<HKObjectType> {
| | `- error: 'HKObjectType' is only available in macOS 13.0 or newer
| `- note: add @available attribute to enclosing static method
50 | var set = Set<HKObjectType>()
51 | if let t = HKObjectType.quantityType(forIdentifier: .heartRate) { set.insert(t) }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Authorization/HealthKitPermissions.swift:57:48: error: 'HKObjectType' is only available in macOS 13.0 or newer
15 |
16 | /// Maps ``HealthDataDomain`` values to concrete HealthKit object types for authorization.
17 | public enum HealthKitPermissions: Sendable {
| `- note: add @available attribute to enclosing enum
18 | /// All sample and object types required to read data for the given domains.
19 | public static func objectTypes(for domains: Set<HealthDataDomain>) -> Set<HKObjectType> {
:
55 | }
56 |
57 | private static func bodyReadTypes() -> Set<HKObjectType> {
| | `- error: 'HKObjectType' is only available in macOS 13.0 or newer
| `- note: add @available attribute to enclosing static method
58 | var set = Set<HKObjectType>()
59 | if let t = HKObjectType.quantityType(forIdentifier: .bodyMass) { set.insert(t) }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Authorization/HealthKitPermissions.swift:20:25: error: 'HKObjectType' is only available in macOS 13.0 or newer
15 |
16 | /// Maps ``HealthDataDomain`` values to concrete HealthKit object types for authorization.
17 | public enum HealthKitPermissions: Sendable {
| `- note: add @available attribute to enclosing enum
18 | /// All sample and object types required to read data for the given domains.
19 | public static func objectTypes(for domains: Set<HealthDataDomain>) -> Set<HKObjectType> {
| `- note: add @available attribute to enclosing static method
20 | var types = Set<HKObjectType>()
| |- error: 'HKObjectType' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
21 | for domain in domains {
22 | switch domain {
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Authorization/HealthKitPermissions.swift:26:36: error: 'HKObjectType' is only available in macOS 13.0 or newer
15 |
16 | /// Maps ``HealthDataDomain`` values to concrete HealthKit object types for authorization.
17 | public enum HealthKitPermissions: Sendable {
| `- note: add @available attribute to enclosing enum
18 | /// All sample and object types required to read data for the given domains.
19 | public static func objectTypes(for domains: Set<HealthDataDomain>) -> Set<HKObjectType> {
| `- note: add @available attribute to enclosing static method
20 | var types = Set<HKObjectType>()
21 | for domain in domains {
:
24 | types.formUnion(activityReadTypes())
25 | case .sleep:
26 | if let sleepType = HKObjectType.categoryType(forIdentifier: .sleepAnalysis) {
| |- error: 'HKObjectType' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
27 | types.insert(sleepType)
28 | }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Authorization/HealthKitPermissions.swift:26:78: error: 'sleepAnalysis' is only available in macOS 13.0 or newer
15 |
16 | /// Maps ``HealthDataDomain`` values to concrete HealthKit object types for authorization.
17 | public enum HealthKitPermissions: Sendable {
| `- note: add @available attribute to enclosing enum
18 | /// All sample and object types required to read data for the given domains.
19 | public static func objectTypes(for domains: Set<HealthDataDomain>) -> Set<HKObjectType> {
| `- note: add @available attribute to enclosing static method
20 | var types = Set<HKObjectType>()
21 | for domain in domains {
:
24 | types.formUnion(activityReadTypes())
25 | case .sleep:
26 | if let sleepType = HKObjectType.categoryType(forIdentifier: .sleepAnalysis) {
| |- error: 'sleepAnalysis' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
27 | types.insert(sleepType)
28 | }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Authorization/HealthKitPermissions.swift:39:23: error: 'HKObjectType' is only available in macOS 13.0 or newer
15 |
16 | /// Maps ``HealthDataDomain`` values to concrete HealthKit object types for authorization.
17 | public enum HealthKitPermissions: Sendable {
| `- note: add @available attribute to enclosing enum
18 | /// All sample and object types required to read data for the given domains.
19 | public static func objectTypes(for domains: Set<HealthDataDomain>) -> Set<HKObjectType> {
:
36 | }
37 |
38 | private static func activityReadTypes() -> Set<HKObjectType> {
| `- note: add @available attribute to enclosing static method
39 | var set = Set<HKObjectType>()
| |- error: 'HKObjectType' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
40 | if let t = HKObjectType.quantityType(forIdentifier: .stepCount) { set.insert(t) }
41 | if let t = HKObjectType.quantityType(forIdentifier: .activeEnergyBurned) { set.insert(t) }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Authorization/HealthKitPermissions.swift:40:20: error: 'HKObjectType' is only available in macOS 13.0 or newer
15 |
16 | /// Maps ``HealthDataDomain`` values to concrete HealthKit object types for authorization.
17 | public enum HealthKitPermissions: Sendable {
| `- note: add @available attribute to enclosing enum
18 | /// All sample and object types required to read data for the given domains.
19 | public static func objectTypes(for domains: Set<HealthDataDomain>) -> Set<HKObjectType> {
:
36 | }
37 |
38 | private static func activityReadTypes() -> Set<HKObjectType> {
| `- note: add @available attribute to enclosing static method
39 | var set = Set<HKObjectType>()
40 | if let t = HKObjectType.quantityType(forIdentifier: .stepCount) { set.insert(t) }
| |- error: 'HKObjectType' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
41 | if let t = HKObjectType.quantityType(forIdentifier: .activeEnergyBurned) { set.insert(t) }
42 | if let t = HKObjectType.quantityType(forIdentifier: .basalEnergyBurned) { set.insert(t) }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Authorization/HealthKitPermissions.swift:40:62: error: 'stepCount' is only available in macOS 13.0 or newer
15 |
16 | /// Maps ``HealthDataDomain`` values to concrete HealthKit object types for authorization.
17 | public enum HealthKitPermissions: Sendable {
| `- note: add @available attribute to enclosing enum
18 | /// All sample and object types required to read data for the given domains.
19 | public static func objectTypes(for domains: Set<HealthDataDomain>) -> Set<HKObjectType> {
:
36 | }
37 |
38 | private static func activityReadTypes() -> Set<HKObjectType> {
| `- note: add @available attribute to enclosing static method
39 | var set = Set<HKObjectType>()
40 | if let t = HKObjectType.quantityType(forIdentifier: .stepCount) { set.insert(t) }
| |- error: 'stepCount' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
41 | if let t = HKObjectType.quantityType(forIdentifier: .activeEnergyBurned) { set.insert(t) }
42 | if let t = HKObjectType.quantityType(forIdentifier: .basalEnergyBurned) { set.insert(t) }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Authorization/HealthKitPermissions.swift:41:20: error: 'HKObjectType' is only available in macOS 13.0 or newer
15 |
16 | /// Maps ``HealthDataDomain`` values to concrete HealthKit object types for authorization.
17 | public enum HealthKitPermissions: Sendable {
| `- note: add @available attribute to enclosing enum
18 | /// All sample and object types required to read data for the given domains.
19 | public static func objectTypes(for domains: Set<HealthDataDomain>) -> Set<HKObjectType> {
:
36 | }
37 |
38 | private static func activityReadTypes() -> Set<HKObjectType> {
| `- note: add @available attribute to enclosing static method
39 | var set = Set<HKObjectType>()
40 | if let t = HKObjectType.quantityType(forIdentifier: .stepCount) { set.insert(t) }
41 | if let t = HKObjectType.quantityType(forIdentifier: .activeEnergyBurned) { set.insert(t) }
| |- error: 'HKObjectType' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
42 | if let t = HKObjectType.quantityType(forIdentifier: .basalEnergyBurned) { set.insert(t) }
43 | if let t = HKObjectType.quantityType(forIdentifier: .distanceWalkingRunning) { set.insert(t) }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Authorization/HealthKitPermissions.swift:41:62: error: 'activeEnergyBurned' is only available in macOS 13.0 or newer
15 |
16 | /// Maps ``HealthDataDomain`` values to concrete HealthKit object types for authorization.
17 | public enum HealthKitPermissions: Sendable {
| `- note: add @available attribute to enclosing enum
18 | /// All sample and object types required to read data for the given domains.
19 | public static func objectTypes(for domains: Set<HealthDataDomain>) -> Set<HKObjectType> {
:
36 | }
37 |
38 | private static func activityReadTypes() -> Set<HKObjectType> {
| `- note: add @available attribute to enclosing static method
39 | var set = Set<HKObjectType>()
40 | if let t = HKObjectType.quantityType(forIdentifier: .stepCount) { set.insert(t) }
41 | if let t = HKObjectType.quantityType(forIdentifier: .activeEnergyBurned) { set.insert(t) }
| |- error: 'activeEnergyBurned' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
42 | if let t = HKObjectType.quantityType(forIdentifier: .basalEnergyBurned) { set.insert(t) }
43 | if let t = HKObjectType.quantityType(forIdentifier: .distanceWalkingRunning) { set.insert(t) }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Authorization/HealthKitPermissions.swift:42:20: error: 'HKObjectType' is only available in macOS 13.0 or newer
15 |
16 | /// Maps ``HealthDataDomain`` values to concrete HealthKit object types for authorization.
17 | public enum HealthKitPermissions: Sendable {
| `- note: add @available attribute to enclosing enum
18 | /// All sample and object types required to read data for the given domains.
19 | public static func objectTypes(for domains: Set<HealthDataDomain>) -> Set<HKObjectType> {
:
36 | }
37 |
38 | private static func activityReadTypes() -> Set<HKObjectType> {
| `- note: add @available attribute to enclosing static method
39 | var set = Set<HKObjectType>()
40 | if let t = HKObjectType.quantityType(forIdentifier: .stepCount) { set.insert(t) }
41 | if let t = HKObjectType.quantityType(forIdentifier: .activeEnergyBurned) { set.insert(t) }
42 | if let t = HKObjectType.quantityType(forIdentifier: .basalEnergyBurned) { set.insert(t) }
| |- error: 'HKObjectType' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
43 | if let t = HKObjectType.quantityType(forIdentifier: .distanceWalkingRunning) { set.insert(t) }
44 | if let t = HKObjectType.quantityType(forIdentifier: .appleExerciseTime) { set.insert(t) }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Authorization/HealthKitPermissions.swift:42:62: error: 'basalEnergyBurned' is only available in macOS 13.0 or newer
15 |
16 | /// Maps ``HealthDataDomain`` values to concrete HealthKit object types for authorization.
17 | public enum HealthKitPermissions: Sendable {
| `- note: add @available attribute to enclosing enum
18 | /// All sample and object types required to read data for the given domains.
19 | public static func objectTypes(for domains: Set<HealthDataDomain>) -> Set<HKObjectType> {
:
36 | }
37 |
38 | private static func activityReadTypes() -> Set<HKObjectType> {
| `- note: add @available attribute to enclosing static method
39 | var set = Set<HKObjectType>()
40 | if let t = HKObjectType.quantityType(forIdentifier: .stepCount) { set.insert(t) }
41 | if let t = HKObjectType.quantityType(forIdentifier: .activeEnergyBurned) { set.insert(t) }
42 | if let t = HKObjectType.quantityType(forIdentifier: .basalEnergyBurned) { set.insert(t) }
| |- error: 'basalEnergyBurned' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
43 | if let t = HKObjectType.quantityType(forIdentifier: .distanceWalkingRunning) { set.insert(t) }
44 | if let t = HKObjectType.quantityType(forIdentifier: .appleExerciseTime) { set.insert(t) }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Authorization/HealthKitPermissions.swift:43:20: error: 'HKObjectType' is only available in macOS 13.0 or newer
15 |
16 | /// Maps ``HealthDataDomain`` values to concrete HealthKit object types for authorization.
17 | public enum HealthKitPermissions: Sendable {
| `- note: add @available attribute to enclosing enum
18 | /// All sample and object types required to read data for the given domains.
19 | public static func objectTypes(for domains: Set<HealthDataDomain>) -> Set<HKObjectType> {
:
36 | }
37 |
38 | private static func activityReadTypes() -> Set<HKObjectType> {
| `- note: add @available attribute to enclosing static method
39 | var set = Set<HKObjectType>()
40 | if let t = HKObjectType.quantityType(forIdentifier: .stepCount) { set.insert(t) }
41 | if let t = HKObjectType.quantityType(forIdentifier: .activeEnergyBurned) { set.insert(t) }
42 | if let t = HKObjectType.quantityType(forIdentifier: .basalEnergyBurned) { set.insert(t) }
43 | if let t = HKObjectType.quantityType(forIdentifier: .distanceWalkingRunning) { set.insert(t) }
| |- error: 'HKObjectType' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
44 | if let t = HKObjectType.quantityType(forIdentifier: .appleExerciseTime) { set.insert(t) }
45 | if let t = HKObjectType.categoryType(forIdentifier: .appleStandHour) { set.insert(t) }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Authorization/HealthKitPermissions.swift:43:62: error: 'distanceWalkingRunning' is only available in macOS 13.0 or newer
15 |
16 | /// Maps ``HealthDataDomain`` values to concrete HealthKit object types for authorization.
17 | public enum HealthKitPermissions: Sendable {
| `- note: add @available attribute to enclosing enum
18 | /// All sample and object types required to read data for the given domains.
19 | public static func objectTypes(for domains: Set<HealthDataDomain>) -> Set<HKObjectType> {
:
36 | }
37 |
38 | private static func activityReadTypes() -> Set<HKObjectType> {
| `- note: add @available attribute to enclosing static method
39 | var set = Set<HKObjectType>()
40 | if let t = HKObjectType.quantityType(forIdentifier: .stepCount) { set.insert(t) }
41 | if let t = HKObjectType.quantityType(forIdentifier: .activeEnergyBurned) { set.insert(t) }
42 | if let t = HKObjectType.quantityType(forIdentifier: .basalEnergyBurned) { set.insert(t) }
43 | if let t = HKObjectType.quantityType(forIdentifier: .distanceWalkingRunning) { set.insert(t) }
| |- error: 'distanceWalkingRunning' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
44 | if let t = HKObjectType.quantityType(forIdentifier: .appleExerciseTime) { set.insert(t) }
45 | if let t = HKObjectType.categoryType(forIdentifier: .appleStandHour) { set.insert(t) }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Authorization/HealthKitPermissions.swift:44:20: error: 'HKObjectType' is only available in macOS 13.0 or newer
15 |
16 | /// Maps ``HealthDataDomain`` values to concrete HealthKit object types for authorization.
17 | public enum HealthKitPermissions: Sendable {
| `- note: add @available attribute to enclosing enum
18 | /// All sample and object types required to read data for the given domains.
19 | public static func objectTypes(for domains: Set<HealthDataDomain>) -> Set<HKObjectType> {
:
36 | }
37 |
38 | private static func activityReadTypes() -> Set<HKObjectType> {
| `- note: add @available attribute to enclosing static method
39 | var set = Set<HKObjectType>()
40 | if let t = HKObjectType.quantityType(forIdentifier: .stepCount) { set.insert(t) }
:
42 | if let t = HKObjectType.quantityType(forIdentifier: .basalEnergyBurned) { set.insert(t) }
43 | if let t = HKObjectType.quantityType(forIdentifier: .distanceWalkingRunning) { set.insert(t) }
44 | if let t = HKObjectType.quantityType(forIdentifier: .appleExerciseTime) { set.insert(t) }
| |- error: 'HKObjectType' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
45 | if let t = HKObjectType.categoryType(forIdentifier: .appleStandHour) { set.insert(t) }
46 | return set
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Authorization/HealthKitPermissions.swift:44:62: error: 'appleExerciseTime' is only available in macOS 13.0 or newer
15 |
16 | /// Maps ``HealthDataDomain`` values to concrete HealthKit object types for authorization.
17 | public enum HealthKitPermissions: Sendable {
| `- note: add @available attribute to enclosing enum
18 | /// All sample and object types required to read data for the given domains.
19 | public static func objectTypes(for domains: Set<HealthDataDomain>) -> Set<HKObjectType> {
:
36 | }
37 |
38 | private static func activityReadTypes() -> Set<HKObjectType> {
| `- note: add @available attribute to enclosing static method
39 | var set = Set<HKObjectType>()
40 | if let t = HKObjectType.quantityType(forIdentifier: .stepCount) { set.insert(t) }
:
42 | if let t = HKObjectType.quantityType(forIdentifier: .basalEnergyBurned) { set.insert(t) }
43 | if let t = HKObjectType.quantityType(forIdentifier: .distanceWalkingRunning) { set.insert(t) }
44 | if let t = HKObjectType.quantityType(forIdentifier: .appleExerciseTime) { set.insert(t) }
| |- error: 'appleExerciseTime' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
45 | if let t = HKObjectType.categoryType(forIdentifier: .appleStandHour) { set.insert(t) }
46 | return set
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Authorization/HealthKitPermissions.swift:45:20: error: 'HKObjectType' is only available in macOS 13.0 or newer
15 |
16 | /// Maps ``HealthDataDomain`` values to concrete HealthKit object types for authorization.
17 | public enum HealthKitPermissions: Sendable {
| `- note: add @available attribute to enclosing enum
18 | /// All sample and object types required to read data for the given domains.
19 | public static func objectTypes(for domains: Set<HealthDataDomain>) -> Set<HKObjectType> {
:
36 | }
37 |
38 | private static func activityReadTypes() -> Set<HKObjectType> {
| `- note: add @available attribute to enclosing static method
39 | var set = Set<HKObjectType>()
40 | if let t = HKObjectType.quantityType(forIdentifier: .stepCount) { set.insert(t) }
:
43 | if let t = HKObjectType.quantityType(forIdentifier: .distanceWalkingRunning) { set.insert(t) }
44 | if let t = HKObjectType.quantityType(forIdentifier: .appleExerciseTime) { set.insert(t) }
45 | if let t = HKObjectType.categoryType(forIdentifier: .appleStandHour) { set.insert(t) }
| |- error: 'HKObjectType' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
46 | return set
47 | }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Authorization/HealthKitPermissions.swift:45:62: error: 'appleStandHour' is only available in macOS 13.0 or newer
15 |
16 | /// Maps ``HealthDataDomain`` values to concrete HealthKit object types for authorization.
17 | public enum HealthKitPermissions: Sendable {
| `- note: add @available attribute to enclosing enum
18 | /// All sample and object types required to read data for the given domains.
19 | public static func objectTypes(for domains: Set<HealthDataDomain>) -> Set<HKObjectType> {
:
36 | }
37 |
38 | private static func activityReadTypes() -> Set<HKObjectType> {
| `- note: add @available attribute to enclosing static method
39 | var set = Set<HKObjectType>()
40 | if let t = HKObjectType.quantityType(forIdentifier: .stepCount) { set.insert(t) }
:
43 | if let t = HKObjectType.quantityType(forIdentifier: .distanceWalkingRunning) { set.insert(t) }
44 | if let t = HKObjectType.quantityType(forIdentifier: .appleExerciseTime) { set.insert(t) }
45 | if let t = HKObjectType.categoryType(forIdentifier: .appleStandHour) { set.insert(t) }
| |- error: 'appleStandHour' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
46 | return set
47 | }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Authorization/HealthKitPermissions.swift:50:23: error: 'HKObjectType' is only available in macOS 13.0 or newer
15 |
16 | /// Maps ``HealthDataDomain`` values to concrete HealthKit object types for authorization.
17 | public enum HealthKitPermissions: Sendable {
| `- note: add @available attribute to enclosing enum
18 | /// All sample and object types required to read data for the given domains.
19 | public static func objectTypes(for domains: Set<HealthDataDomain>) -> Set<HKObjectType> {
:
47 | }
48 |
49 | private static func heartReadTypes() -> Set<HKObjectType> {
| `- note: add @available attribute to enclosing static method
50 | var set = Set<HKObjectType>()
| |- error: 'HKObjectType' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
51 | if let t = HKObjectType.quantityType(forIdentifier: .heartRate) { set.insert(t) }
52 | if let t = HKObjectType.quantityType(forIdentifier: .restingHeartRate) { set.insert(t) }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Authorization/HealthKitPermissions.swift:51:20: error: 'HKObjectType' is only available in macOS 13.0 or newer
15 |
16 | /// Maps ``HealthDataDomain`` values to concrete HealthKit object types for authorization.
17 | public enum HealthKitPermissions: Sendable {
| `- note: add @available attribute to enclosing enum
18 | /// All sample and object types required to read data for the given domains.
19 | public static func objectTypes(for domains: Set<HealthDataDomain>) -> Set<HKObjectType> {
:
47 | }
48 |
49 | private static func heartReadTypes() -> Set<HKObjectType> {
| `- note: add @available attribute to enclosing static method
50 | var set = Set<HKObjectType>()
51 | if let t = HKObjectType.quantityType(forIdentifier: .heartRate) { set.insert(t) }
| |- error: 'HKObjectType' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
52 | if let t = HKObjectType.quantityType(forIdentifier: .restingHeartRate) { set.insert(t) }
53 | if let t = HKObjectType.quantityType(forIdentifier: .heartRateVariabilitySDNN) { set.insert(t) }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Authorization/HealthKitPermissions.swift:51:62: error: 'heartRate' is only available in macOS 13.0 or newer
15 |
16 | /// Maps ``HealthDataDomain`` values to concrete HealthKit object types for authorization.
17 | public enum HealthKitPermissions: Sendable {
| `- note: add @available attribute to enclosing enum
18 | /// All sample and object types required to read data for the given domains.
19 | public static func objectTypes(for domains: Set<HealthDataDomain>) -> Set<HKObjectType> {
:
47 | }
48 |
49 | private static func heartReadTypes() -> Set<HKObjectType> {
| `- note: add @available attribute to enclosing static method
50 | var set = Set<HKObjectType>()
51 | if let t = HKObjectType.quantityType(forIdentifier: .heartRate) { set.insert(t) }
| |- error: 'heartRate' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
52 | if let t = HKObjectType.quantityType(forIdentifier: .restingHeartRate) { set.insert(t) }
53 | if let t = HKObjectType.quantityType(forIdentifier: .heartRateVariabilitySDNN) { set.insert(t) }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Authorization/HealthKitPermissions.swift:52:20: error: 'HKObjectType' is only available in macOS 13.0 or newer
15 |
16 | /// Maps ``HealthDataDomain`` values to concrete HealthKit object types for authorization.
17 | public enum HealthKitPermissions: Sendable {
| `- note: add @available attribute to enclosing enum
18 | /// All sample and object types required to read data for the given domains.
19 | public static func objectTypes(for domains: Set<HealthDataDomain>) -> Set<HKObjectType> {
:
47 | }
48 |
49 | private static func heartReadTypes() -> Set<HKObjectType> {
| `- note: add @available attribute to enclosing static method
50 | var set = Set<HKObjectType>()
51 | if let t = HKObjectType.quantityType(forIdentifier: .heartRate) { set.insert(t) }
52 | if let t = HKObjectType.quantityType(forIdentifier: .restingHeartRate) { set.insert(t) }
| |- error: 'HKObjectType' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
53 | if let t = HKObjectType.quantityType(forIdentifier: .heartRateVariabilitySDNN) { set.insert(t) }
54 | return set
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Authorization/HealthKitPermissions.swift:52:62: error: 'restingHeartRate' is only available in macOS 13.0 or newer
15 |
16 | /// Maps ``HealthDataDomain`` values to concrete HealthKit object types for authorization.
17 | public enum HealthKitPermissions: Sendable {
| `- note: add @available attribute to enclosing enum
18 | /// All sample and object types required to read data for the given domains.
19 | public static func objectTypes(for domains: Set<HealthDataDomain>) -> Set<HKObjectType> {
:
47 | }
48 |
49 | private static func heartReadTypes() -> Set<HKObjectType> {
| `- note: add @available attribute to enclosing static method
50 | var set = Set<HKObjectType>()
51 | if let t = HKObjectType.quantityType(forIdentifier: .heartRate) { set.insert(t) }
52 | if let t = HKObjectType.quantityType(forIdentifier: .restingHeartRate) { set.insert(t) }
| |- error: 'restingHeartRate' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
53 | if let t = HKObjectType.quantityType(forIdentifier: .heartRateVariabilitySDNN) { set.insert(t) }
54 | return set
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Authorization/HealthKitPermissions.swift:53:20: error: 'HKObjectType' is only available in macOS 13.0 or newer
15 |
16 | /// Maps ``HealthDataDomain`` values to concrete HealthKit object types for authorization.
17 | public enum HealthKitPermissions: Sendable {
| `- note: add @available attribute to enclosing enum
18 | /// All sample and object types required to read data for the given domains.
19 | public static func objectTypes(for domains: Set<HealthDataDomain>) -> Set<HKObjectType> {
:
47 | }
48 |
49 | private static func heartReadTypes() -> Set<HKObjectType> {
| `- note: add @available attribute to enclosing static method
50 | var set = Set<HKObjectType>()
51 | if let t = HKObjectType.quantityType(forIdentifier: .heartRate) { set.insert(t) }
52 | if let t = HKObjectType.quantityType(forIdentifier: .restingHeartRate) { set.insert(t) }
53 | if let t = HKObjectType.quantityType(forIdentifier: .heartRateVariabilitySDNN) { set.insert(t) }
| |- error: 'HKObjectType' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
54 | return set
55 | }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Authorization/HealthKitPermissions.swift:53:62: error: 'heartRateVariabilitySDNN' is only available in macOS 13.0 or newer
15 |
16 | /// Maps ``HealthDataDomain`` values to concrete HealthKit object types for authorization.
17 | public enum HealthKitPermissions: Sendable {
| `- note: add @available attribute to enclosing enum
18 | /// All sample and object types required to read data for the given domains.
19 | public static func objectTypes(for domains: Set<HealthDataDomain>) -> Set<HKObjectType> {
:
47 | }
48 |
49 | private static func heartReadTypes() -> Set<HKObjectType> {
| `- note: add @available attribute to enclosing static method
50 | var set = Set<HKObjectType>()
51 | if let t = HKObjectType.quantityType(forIdentifier: .heartRate) { set.insert(t) }
52 | if let t = HKObjectType.quantityType(forIdentifier: .restingHeartRate) { set.insert(t) }
53 | if let t = HKObjectType.quantityType(forIdentifier: .heartRateVariabilitySDNN) { set.insert(t) }
| |- error: 'heartRateVariabilitySDNN' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
54 | return set
55 | }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Authorization/HealthKitPermissions.swift:58:23: error: 'HKObjectType' is only available in macOS 13.0 or newer
15 |
16 | /// Maps ``HealthDataDomain`` values to concrete HealthKit object types for authorization.
17 | public enum HealthKitPermissions: Sendable {
| `- note: add @available attribute to enclosing enum
18 | /// All sample and object types required to read data for the given domains.
19 | public static func objectTypes(for domains: Set<HealthDataDomain>) -> Set<HKObjectType> {
:
55 | }
56 |
57 | private static func bodyReadTypes() -> Set<HKObjectType> {
| `- note: add @available attribute to enclosing static method
58 | var set = Set<HKObjectType>()
| |- error: 'HKObjectType' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
59 | if let t = HKObjectType.quantityType(forIdentifier: .bodyMass) { set.insert(t) }
60 | if let t = HKObjectType.quantityType(forIdentifier: .bodyMassIndex) { set.insert(t) }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Authorization/HealthKitPermissions.swift:59:20: error: 'HKObjectType' is only available in macOS 13.0 or newer
15 |
16 | /// Maps ``HealthDataDomain`` values to concrete HealthKit object types for authorization.
17 | public enum HealthKitPermissions: Sendable {
| `- note: add @available attribute to enclosing enum
18 | /// All sample and object types required to read data for the given domains.
19 | public static func objectTypes(for domains: Set<HealthDataDomain>) -> Set<HKObjectType> {
:
55 | }
56 |
57 | private static func bodyReadTypes() -> Set<HKObjectType> {
| `- note: add @available attribute to enclosing static method
58 | var set = Set<HKObjectType>()
59 | if let t = HKObjectType.quantityType(forIdentifier: .bodyMass) { set.insert(t) }
| |- error: 'HKObjectType' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
60 | if let t = HKObjectType.quantityType(forIdentifier: .bodyMassIndex) { set.insert(t) }
61 | if let t = HKObjectType.quantityType(forIdentifier: .bodyFatPercentage) { set.insert(t) }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Authorization/HealthKitPermissions.swift:59:62: error: 'bodyMass' is only available in macOS 13.0 or newer
15 |
16 | /// Maps ``HealthDataDomain`` values to concrete HealthKit object types for authorization.
17 | public enum HealthKitPermissions: Sendable {
| `- note: add @available attribute to enclosing enum
18 | /// All sample and object types required to read data for the given domains.
19 | public static func objectTypes(for domains: Set<HealthDataDomain>) -> Set<HKObjectType> {
:
55 | }
56 |
57 | private static func bodyReadTypes() -> Set<HKObjectType> {
| `- note: add @available attribute to enclosing static method
58 | var set = Set<HKObjectType>()
59 | if let t = HKObjectType.quantityType(forIdentifier: .bodyMass) { set.insert(t) }
| |- error: 'bodyMass' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
60 | if let t = HKObjectType.quantityType(forIdentifier: .bodyMassIndex) { set.insert(t) }
61 | if let t = HKObjectType.quantityType(forIdentifier: .bodyFatPercentage) { set.insert(t) }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Authorization/HealthKitPermissions.swift:60:20: error: 'HKObjectType' is only available in macOS 13.0 or newer
15 |
16 | /// Maps ``HealthDataDomain`` values to concrete HealthKit object types for authorization.
17 | public enum HealthKitPermissions: Sendable {
| `- note: add @available attribute to enclosing enum
18 | /// All sample and object types required to read data for the given domains.
19 | public static func objectTypes(for domains: Set<HealthDataDomain>) -> Set<HKObjectType> {
:
55 | }
56 |
57 | private static func bodyReadTypes() -> Set<HKObjectType> {
| `- note: add @available attribute to enclosing static method
58 | var set = Set<HKObjectType>()
59 | if let t = HKObjectType.quantityType(forIdentifier: .bodyMass) { set.insert(t) }
60 | if let t = HKObjectType.quantityType(forIdentifier: .bodyMassIndex) { set.insert(t) }
| |- error: 'HKObjectType' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
61 | if let t = HKObjectType.quantityType(forIdentifier: .bodyFatPercentage) { set.insert(t) }
62 | return set
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Authorization/HealthKitPermissions.swift:60:62: error: 'bodyMassIndex' is only available in macOS 13.0 or newer
15 |
16 | /// Maps ``HealthDataDomain`` values to concrete HealthKit object types for authorization.
17 | public enum HealthKitPermissions: Sendable {
| `- note: add @available attribute to enclosing enum
18 | /// All sample and object types required to read data for the given domains.
19 | public static func objectTypes(for domains: Set<HealthDataDomain>) -> Set<HKObjectType> {
:
55 | }
56 |
57 | private static func bodyReadTypes() -> Set<HKObjectType> {
| `- note: add @available attribute to enclosing static method
58 | var set = Set<HKObjectType>()
59 | if let t = HKObjectType.quantityType(forIdentifier: .bodyMass) { set.insert(t) }
60 | if let t = HKObjectType.quantityType(forIdentifier: .bodyMassIndex) { set.insert(t) }
| |- error: 'bodyMassIndex' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
61 | if let t = HKObjectType.quantityType(forIdentifier: .bodyFatPercentage) { set.insert(t) }
62 | return set
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Authorization/HealthKitPermissions.swift:61:20: error: 'HKObjectType' is only available in macOS 13.0 or newer
15 |
16 | /// Maps ``HealthDataDomain`` values to concrete HealthKit object types for authorization.
17 | public enum HealthKitPermissions: Sendable {
| `- note: add @available attribute to enclosing enum
18 | /// All sample and object types required to read data for the given domains.
19 | public static func objectTypes(for domains: Set<HealthDataDomain>) -> Set<HKObjectType> {
:
55 | }
56 |
57 | private static func bodyReadTypes() -> Set<HKObjectType> {
| `- note: add @available attribute to enclosing static method
58 | var set = Set<HKObjectType>()
59 | if let t = HKObjectType.quantityType(forIdentifier: .bodyMass) { set.insert(t) }
60 | if let t = HKObjectType.quantityType(forIdentifier: .bodyMassIndex) { set.insert(t) }
61 | if let t = HKObjectType.quantityType(forIdentifier: .bodyFatPercentage) { set.insert(t) }
| |- error: 'HKObjectType' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
62 | return set
63 | }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Authorization/HealthKitPermissions.swift:61:62: error: 'bodyFatPercentage' is only available in macOS 13.0 or newer
15 |
16 | /// Maps ``HealthDataDomain`` values to concrete HealthKit object types for authorization.
17 | public enum HealthKitPermissions: Sendable {
| `- note: add @available attribute to enclosing enum
18 | /// All sample and object types required to read data for the given domains.
19 | public static func objectTypes(for domains: Set<HealthDataDomain>) -> Set<HKObjectType> {
:
55 | }
56 |
57 | private static func bodyReadTypes() -> Set<HKObjectType> {
| `- note: add @available attribute to enclosing static method
58 | var set = Set<HKObjectType>()
59 | if let t = HKObjectType.quantityType(forIdentifier: .bodyMass) { set.insert(t) }
60 | if let t = HKObjectType.quantityType(forIdentifier: .bodyMassIndex) { set.insert(t) }
61 | if let t = HKObjectType.quantityType(forIdentifier: .bodyFatPercentage) { set.insert(t) }
| |- error: 'bodyFatPercentage' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
62 | return set
63 | }
[19/20] Compiling HealthSnapKit HealthSnapError.swift
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Authorization/HealthKitPermissions.swift:19:79: error: 'HKObjectType' is only available in macOS 13.0 or newer
15 |
16 | /// Maps ``HealthDataDomain`` values to concrete HealthKit object types for authorization.
17 | public enum HealthKitPermissions: Sendable {
| `- note: add @available attribute to enclosing enum
18 | /// All sample and object types required to read data for the given domains.
19 | public static func objectTypes(for domains: Set<HealthDataDomain>) -> Set<HKObjectType> {
| | `- error: 'HKObjectType' is only available in macOS 13.0 or newer
| `- note: add @available attribute to enclosing static method
20 | var types = Set<HKObjectType>()
21 | for domain in domains {
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Authorization/HealthKitPermissions.swift:38:52: error: 'HKObjectType' is only available in macOS 13.0 or newer
15 |
16 | /// Maps ``HealthDataDomain`` values to concrete HealthKit object types for authorization.
17 | public enum HealthKitPermissions: Sendable {
| `- note: add @available attribute to enclosing enum
18 | /// All sample and object types required to read data for the given domains.
19 | public static func objectTypes(for domains: Set<HealthDataDomain>) -> Set<HKObjectType> {
:
36 | }
37 |
38 | private static func activityReadTypes() -> Set<HKObjectType> {
| | `- error: 'HKObjectType' is only available in macOS 13.0 or newer
| `- note: add @available attribute to enclosing static method
39 | var set = Set<HKObjectType>()
40 | if let t = HKObjectType.quantityType(forIdentifier: .stepCount) { set.insert(t) }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Authorization/HealthKitPermissions.swift:49:49: error: 'HKObjectType' is only available in macOS 13.0 or newer
15 |
16 | /// Maps ``HealthDataDomain`` values to concrete HealthKit object types for authorization.
17 | public enum HealthKitPermissions: Sendable {
| `- note: add @available attribute to enclosing enum
18 | /// All sample and object types required to read data for the given domains.
19 | public static func objectTypes(for domains: Set<HealthDataDomain>) -> Set<HKObjectType> {
:
47 | }
48 |
49 | private static func heartReadTypes() -> Set<HKObjectType> {
| | `- error: 'HKObjectType' is only available in macOS 13.0 or newer
| `- note: add @available attribute to enclosing static method
50 | var set = Set<HKObjectType>()
51 | if let t = HKObjectType.quantityType(forIdentifier: .heartRate) { set.insert(t) }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Authorization/HealthKitPermissions.swift:57:48: error: 'HKObjectType' is only available in macOS 13.0 or newer
15 |
16 | /// Maps ``HealthDataDomain`` values to concrete HealthKit object types for authorization.
17 | public enum HealthKitPermissions: Sendable {
| `- note: add @available attribute to enclosing enum
18 | /// All sample and object types required to read data for the given domains.
19 | public static func objectTypes(for domains: Set<HealthDataDomain>) -> Set<HKObjectType> {
:
55 | }
56 |
57 | private static func bodyReadTypes() -> Set<HKObjectType> {
| | `- error: 'HKObjectType' is only available in macOS 13.0 or newer
| `- note: add @available attribute to enclosing static method
58 | var set = Set<HKObjectType>()
59 | if let t = HKObjectType.quantityType(forIdentifier: .bodyMass) { set.insert(t) }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Authorization/HealthKitPermissions.swift:20:25: error: 'HKObjectType' is only available in macOS 13.0 or newer
15 |
16 | /// Maps ``HealthDataDomain`` values to concrete HealthKit object types for authorization.
17 | public enum HealthKitPermissions: Sendable {
| `- note: add @available attribute to enclosing enum
18 | /// All sample and object types required to read data for the given domains.
19 | public static func objectTypes(for domains: Set<HealthDataDomain>) -> Set<HKObjectType> {
| `- note: add @available attribute to enclosing static method
20 | var types = Set<HKObjectType>()
| |- error: 'HKObjectType' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
21 | for domain in domains {
22 | switch domain {
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Authorization/HealthKitPermissions.swift:26:36: error: 'HKObjectType' is only available in macOS 13.0 or newer
15 |
16 | /// Maps ``HealthDataDomain`` values to concrete HealthKit object types for authorization.
17 | public enum HealthKitPermissions: Sendable {
| `- note: add @available attribute to enclosing enum
18 | /// All sample and object types required to read data for the given domains.
19 | public static func objectTypes(for domains: Set<HealthDataDomain>) -> Set<HKObjectType> {
| `- note: add @available attribute to enclosing static method
20 | var types = Set<HKObjectType>()
21 | for domain in domains {
:
24 | types.formUnion(activityReadTypes())
25 | case .sleep:
26 | if let sleepType = HKObjectType.categoryType(forIdentifier: .sleepAnalysis) {
| |- error: 'HKObjectType' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
27 | types.insert(sleepType)
28 | }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Authorization/HealthKitPermissions.swift:26:78: error: 'sleepAnalysis' is only available in macOS 13.0 or newer
15 |
16 | /// Maps ``HealthDataDomain`` values to concrete HealthKit object types for authorization.
17 | public enum HealthKitPermissions: Sendable {
| `- note: add @available attribute to enclosing enum
18 | /// All sample and object types required to read data for the given domains.
19 | public static func objectTypes(for domains: Set<HealthDataDomain>) -> Set<HKObjectType> {
| `- note: add @available attribute to enclosing static method
20 | var types = Set<HKObjectType>()
21 | for domain in domains {
:
24 | types.formUnion(activityReadTypes())
25 | case .sleep:
26 | if let sleepType = HKObjectType.categoryType(forIdentifier: .sleepAnalysis) {
| |- error: 'sleepAnalysis' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
27 | types.insert(sleepType)
28 | }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Authorization/HealthKitPermissions.swift:39:23: error: 'HKObjectType' is only available in macOS 13.0 or newer
15 |
16 | /// Maps ``HealthDataDomain`` values to concrete HealthKit object types for authorization.
17 | public enum HealthKitPermissions: Sendable {
| `- note: add @available attribute to enclosing enum
18 | /// All sample and object types required to read data for the given domains.
19 | public static func objectTypes(for domains: Set<HealthDataDomain>) -> Set<HKObjectType> {
:
36 | }
37 |
38 | private static func activityReadTypes() -> Set<HKObjectType> {
| `- note: add @available attribute to enclosing static method
39 | var set = Set<HKObjectType>()
| |- error: 'HKObjectType' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
40 | if let t = HKObjectType.quantityType(forIdentifier: .stepCount) { set.insert(t) }
41 | if let t = HKObjectType.quantityType(forIdentifier: .activeEnergyBurned) { set.insert(t) }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Authorization/HealthKitPermissions.swift:40:20: error: 'HKObjectType' is only available in macOS 13.0 or newer
15 |
16 | /// Maps ``HealthDataDomain`` values to concrete HealthKit object types for authorization.
17 | public enum HealthKitPermissions: Sendable {
| `- note: add @available attribute to enclosing enum
18 | /// All sample and object types required to read data for the given domains.
19 | public static func objectTypes(for domains: Set<HealthDataDomain>) -> Set<HKObjectType> {
:
36 | }
37 |
38 | private static func activityReadTypes() -> Set<HKObjectType> {
| `- note: add @available attribute to enclosing static method
39 | var set = Set<HKObjectType>()
40 | if let t = HKObjectType.quantityType(forIdentifier: .stepCount) { set.insert(t) }
| |- error: 'HKObjectType' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
41 | if let t = HKObjectType.quantityType(forIdentifier: .activeEnergyBurned) { set.insert(t) }
42 | if let t = HKObjectType.quantityType(forIdentifier: .basalEnergyBurned) { set.insert(t) }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Authorization/HealthKitPermissions.swift:40:62: error: 'stepCount' is only available in macOS 13.0 or newer
15 |
16 | /// Maps ``HealthDataDomain`` values to concrete HealthKit object types for authorization.
17 | public enum HealthKitPermissions: Sendable {
| `- note: add @available attribute to enclosing enum
18 | /// All sample and object types required to read data for the given domains.
19 | public static func objectTypes(for domains: Set<HealthDataDomain>) -> Set<HKObjectType> {
:
36 | }
37 |
38 | private static func activityReadTypes() -> Set<HKObjectType> {
| `- note: add @available attribute to enclosing static method
39 | var set = Set<HKObjectType>()
40 | if let t = HKObjectType.quantityType(forIdentifier: .stepCount) { set.insert(t) }
| |- error: 'stepCount' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
41 | if let t = HKObjectType.quantityType(forIdentifier: .activeEnergyBurned) { set.insert(t) }
42 | if let t = HKObjectType.quantityType(forIdentifier: .basalEnergyBurned) { set.insert(t) }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Authorization/HealthKitPermissions.swift:41:20: error: 'HKObjectType' is only available in macOS 13.0 or newer
15 |
16 | /// Maps ``HealthDataDomain`` values to concrete HealthKit object types for authorization.
17 | public enum HealthKitPermissions: Sendable {
| `- note: add @available attribute to enclosing enum
18 | /// All sample and object types required to read data for the given domains.
19 | public static func objectTypes(for domains: Set<HealthDataDomain>) -> Set<HKObjectType> {
:
36 | }
37 |
38 | private static func activityReadTypes() -> Set<HKObjectType> {
| `- note: add @available attribute to enclosing static method
39 | var set = Set<HKObjectType>()
40 | if let t = HKObjectType.quantityType(forIdentifier: .stepCount) { set.insert(t) }
41 | if let t = HKObjectType.quantityType(forIdentifier: .activeEnergyBurned) { set.insert(t) }
| |- error: 'HKObjectType' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
42 | if let t = HKObjectType.quantityType(forIdentifier: .basalEnergyBurned) { set.insert(t) }
43 | if let t = HKObjectType.quantityType(forIdentifier: .distanceWalkingRunning) { set.insert(t) }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Authorization/HealthKitPermissions.swift:41:62: error: 'activeEnergyBurned' is only available in macOS 13.0 or newer
15 |
16 | /// Maps ``HealthDataDomain`` values to concrete HealthKit object types for authorization.
17 | public enum HealthKitPermissions: Sendable {
| `- note: add @available attribute to enclosing enum
18 | /// All sample and object types required to read data for the given domains.
19 | public static func objectTypes(for domains: Set<HealthDataDomain>) -> Set<HKObjectType> {
:
36 | }
37 |
38 | private static func activityReadTypes() -> Set<HKObjectType> {
| `- note: add @available attribute to enclosing static method
39 | var set = Set<HKObjectType>()
40 | if let t = HKObjectType.quantityType(forIdentifier: .stepCount) { set.insert(t) }
41 | if let t = HKObjectType.quantityType(forIdentifier: .activeEnergyBurned) { set.insert(t) }
| |- error: 'activeEnergyBurned' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
42 | if let t = HKObjectType.quantityType(forIdentifier: .basalEnergyBurned) { set.insert(t) }
43 | if let t = HKObjectType.quantityType(forIdentifier: .distanceWalkingRunning) { set.insert(t) }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Authorization/HealthKitPermissions.swift:42:20: error: 'HKObjectType' is only available in macOS 13.0 or newer
15 |
16 | /// Maps ``HealthDataDomain`` values to concrete HealthKit object types for authorization.
17 | public enum HealthKitPermissions: Sendable {
| `- note: add @available attribute to enclosing enum
18 | /// All sample and object types required to read data for the given domains.
19 | public static func objectTypes(for domains: Set<HealthDataDomain>) -> Set<HKObjectType> {
:
36 | }
37 |
38 | private static func activityReadTypes() -> Set<HKObjectType> {
| `- note: add @available attribute to enclosing static method
39 | var set = Set<HKObjectType>()
40 | if let t = HKObjectType.quantityType(forIdentifier: .stepCount) { set.insert(t) }
41 | if let t = HKObjectType.quantityType(forIdentifier: .activeEnergyBurned) { set.insert(t) }
42 | if let t = HKObjectType.quantityType(forIdentifier: .basalEnergyBurned) { set.insert(t) }
| |- error: 'HKObjectType' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
43 | if let t = HKObjectType.quantityType(forIdentifier: .distanceWalkingRunning) { set.insert(t) }
44 | if let t = HKObjectType.quantityType(forIdentifier: .appleExerciseTime) { set.insert(t) }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Authorization/HealthKitPermissions.swift:42:62: error: 'basalEnergyBurned' is only available in macOS 13.0 or newer
15 |
16 | /// Maps ``HealthDataDomain`` values to concrete HealthKit object types for authorization.
17 | public enum HealthKitPermissions: Sendable {
| `- note: add @available attribute to enclosing enum
18 | /// All sample and object types required to read data for the given domains.
19 | public static func objectTypes(for domains: Set<HealthDataDomain>) -> Set<HKObjectType> {
:
36 | }
37 |
38 | private static func activityReadTypes() -> Set<HKObjectType> {
| `- note: add @available attribute to enclosing static method
39 | var set = Set<HKObjectType>()
40 | if let t = HKObjectType.quantityType(forIdentifier: .stepCount) { set.insert(t) }
41 | if let t = HKObjectType.quantityType(forIdentifier: .activeEnergyBurned) { set.insert(t) }
42 | if let t = HKObjectType.quantityType(forIdentifier: .basalEnergyBurned) { set.insert(t) }
| |- error: 'basalEnergyBurned' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
43 | if let t = HKObjectType.quantityType(forIdentifier: .distanceWalkingRunning) { set.insert(t) }
44 | if let t = HKObjectType.quantityType(forIdentifier: .appleExerciseTime) { set.insert(t) }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Authorization/HealthKitPermissions.swift:43:20: error: 'HKObjectType' is only available in macOS 13.0 or newer
15 |
16 | /// Maps ``HealthDataDomain`` values to concrete HealthKit object types for authorization.
17 | public enum HealthKitPermissions: Sendable {
| `- note: add @available attribute to enclosing enum
18 | /// All sample and object types required to read data for the given domains.
19 | public static func objectTypes(for domains: Set<HealthDataDomain>) -> Set<HKObjectType> {
:
36 | }
37 |
38 | private static func activityReadTypes() -> Set<HKObjectType> {
| `- note: add @available attribute to enclosing static method
39 | var set = Set<HKObjectType>()
40 | if let t = HKObjectType.quantityType(forIdentifier: .stepCount) { set.insert(t) }
41 | if let t = HKObjectType.quantityType(forIdentifier: .activeEnergyBurned) { set.insert(t) }
42 | if let t = HKObjectType.quantityType(forIdentifier: .basalEnergyBurned) { set.insert(t) }
43 | if let t = HKObjectType.quantityType(forIdentifier: .distanceWalkingRunning) { set.insert(t) }
| |- error: 'HKObjectType' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
44 | if let t = HKObjectType.quantityType(forIdentifier: .appleExerciseTime) { set.insert(t) }
45 | if let t = HKObjectType.categoryType(forIdentifier: .appleStandHour) { set.insert(t) }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Authorization/HealthKitPermissions.swift:43:62: error: 'distanceWalkingRunning' is only available in macOS 13.0 or newer
15 |
16 | /// Maps ``HealthDataDomain`` values to concrete HealthKit object types for authorization.
17 | public enum HealthKitPermissions: Sendable {
| `- note: add @available attribute to enclosing enum
18 | /// All sample and object types required to read data for the given domains.
19 | public static func objectTypes(for domains: Set<HealthDataDomain>) -> Set<HKObjectType> {
:
36 | }
37 |
38 | private static func activityReadTypes() -> Set<HKObjectType> {
| `- note: add @available attribute to enclosing static method
39 | var set = Set<HKObjectType>()
40 | if let t = HKObjectType.quantityType(forIdentifier: .stepCount) { set.insert(t) }
41 | if let t = HKObjectType.quantityType(forIdentifier: .activeEnergyBurned) { set.insert(t) }
42 | if let t = HKObjectType.quantityType(forIdentifier: .basalEnergyBurned) { set.insert(t) }
43 | if let t = HKObjectType.quantityType(forIdentifier: .distanceWalkingRunning) { set.insert(t) }
| |- error: 'distanceWalkingRunning' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
44 | if let t = HKObjectType.quantityType(forIdentifier: .appleExerciseTime) { set.insert(t) }
45 | if let t = HKObjectType.categoryType(forIdentifier: .appleStandHour) { set.insert(t) }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Authorization/HealthKitPermissions.swift:44:20: error: 'HKObjectType' is only available in macOS 13.0 or newer
15 |
16 | /// Maps ``HealthDataDomain`` values to concrete HealthKit object types for authorization.
17 | public enum HealthKitPermissions: Sendable {
| `- note: add @available attribute to enclosing enum
18 | /// All sample and object types required to read data for the given domains.
19 | public static func objectTypes(for domains: Set<HealthDataDomain>) -> Set<HKObjectType> {
:
36 | }
37 |
38 | private static func activityReadTypes() -> Set<HKObjectType> {
| `- note: add @available attribute to enclosing static method
39 | var set = Set<HKObjectType>()
40 | if let t = HKObjectType.quantityType(forIdentifier: .stepCount) { set.insert(t) }
:
42 | if let t = HKObjectType.quantityType(forIdentifier: .basalEnergyBurned) { set.insert(t) }
43 | if let t = HKObjectType.quantityType(forIdentifier: .distanceWalkingRunning) { set.insert(t) }
44 | if let t = HKObjectType.quantityType(forIdentifier: .appleExerciseTime) { set.insert(t) }
| |- error: 'HKObjectType' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
45 | if let t = HKObjectType.categoryType(forIdentifier: .appleStandHour) { set.insert(t) }
46 | return set
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Authorization/HealthKitPermissions.swift:44:62: error: 'appleExerciseTime' is only available in macOS 13.0 or newer
15 |
16 | /// Maps ``HealthDataDomain`` values to concrete HealthKit object types for authorization.
17 | public enum HealthKitPermissions: Sendable {
| `- note: add @available attribute to enclosing enum
18 | /// All sample and object types required to read data for the given domains.
19 | public static func objectTypes(for domains: Set<HealthDataDomain>) -> Set<HKObjectType> {
:
36 | }
37 |
38 | private static func activityReadTypes() -> Set<HKObjectType> {
| `- note: add @available attribute to enclosing static method
39 | var set = Set<HKObjectType>()
40 | if let t = HKObjectType.quantityType(forIdentifier: .stepCount) { set.insert(t) }
:
42 | if let t = HKObjectType.quantityType(forIdentifier: .basalEnergyBurned) { set.insert(t) }
43 | if let t = HKObjectType.quantityType(forIdentifier: .distanceWalkingRunning) { set.insert(t) }
44 | if let t = HKObjectType.quantityType(forIdentifier: .appleExerciseTime) { set.insert(t) }
| |- error: 'appleExerciseTime' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
45 | if let t = HKObjectType.categoryType(forIdentifier: .appleStandHour) { set.insert(t) }
46 | return set
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Authorization/HealthKitPermissions.swift:45:20: error: 'HKObjectType' is only available in macOS 13.0 or newer
15 |
16 | /// Maps ``HealthDataDomain`` values to concrete HealthKit object types for authorization.
17 | public enum HealthKitPermissions: Sendable {
| `- note: add @available attribute to enclosing enum
18 | /// All sample and object types required to read data for the given domains.
19 | public static func objectTypes(for domains: Set<HealthDataDomain>) -> Set<HKObjectType> {
:
36 | }
37 |
38 | private static func activityReadTypes() -> Set<HKObjectType> {
| `- note: add @available attribute to enclosing static method
39 | var set = Set<HKObjectType>()
40 | if let t = HKObjectType.quantityType(forIdentifier: .stepCount) { set.insert(t) }
:
43 | if let t = HKObjectType.quantityType(forIdentifier: .distanceWalkingRunning) { set.insert(t) }
44 | if let t = HKObjectType.quantityType(forIdentifier: .appleExerciseTime) { set.insert(t) }
45 | if let t = HKObjectType.categoryType(forIdentifier: .appleStandHour) { set.insert(t) }
| |- error: 'HKObjectType' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
46 | return set
47 | }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Authorization/HealthKitPermissions.swift:45:62: error: 'appleStandHour' is only available in macOS 13.0 or newer
15 |
16 | /// Maps ``HealthDataDomain`` values to concrete HealthKit object types for authorization.
17 | public enum HealthKitPermissions: Sendable {
| `- note: add @available attribute to enclosing enum
18 | /// All sample and object types required to read data for the given domains.
19 | public static func objectTypes(for domains: Set<HealthDataDomain>) -> Set<HKObjectType> {
:
36 | }
37 |
38 | private static func activityReadTypes() -> Set<HKObjectType> {
| `- note: add @available attribute to enclosing static method
39 | var set = Set<HKObjectType>()
40 | if let t = HKObjectType.quantityType(forIdentifier: .stepCount) { set.insert(t) }
:
43 | if let t = HKObjectType.quantityType(forIdentifier: .distanceWalkingRunning) { set.insert(t) }
44 | if let t = HKObjectType.quantityType(forIdentifier: .appleExerciseTime) { set.insert(t) }
45 | if let t = HKObjectType.categoryType(forIdentifier: .appleStandHour) { set.insert(t) }
| |- error: 'appleStandHour' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
46 | return set
47 | }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Authorization/HealthKitPermissions.swift:50:23: error: 'HKObjectType' is only available in macOS 13.0 or newer
15 |
16 | /// Maps ``HealthDataDomain`` values to concrete HealthKit object types for authorization.
17 | public enum HealthKitPermissions: Sendable {
| `- note: add @available attribute to enclosing enum
18 | /// All sample and object types required to read data for the given domains.
19 | public static func objectTypes(for domains: Set<HealthDataDomain>) -> Set<HKObjectType> {
:
47 | }
48 |
49 | private static func heartReadTypes() -> Set<HKObjectType> {
| `- note: add @available attribute to enclosing static method
50 | var set = Set<HKObjectType>()
| |- error: 'HKObjectType' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
51 | if let t = HKObjectType.quantityType(forIdentifier: .heartRate) { set.insert(t) }
52 | if let t = HKObjectType.quantityType(forIdentifier: .restingHeartRate) { set.insert(t) }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Authorization/HealthKitPermissions.swift:51:20: error: 'HKObjectType' is only available in macOS 13.0 or newer
15 |
16 | /// Maps ``HealthDataDomain`` values to concrete HealthKit object types for authorization.
17 | public enum HealthKitPermissions: Sendable {
| `- note: add @available attribute to enclosing enum
18 | /// All sample and object types required to read data for the given domains.
19 | public static func objectTypes(for domains: Set<HealthDataDomain>) -> Set<HKObjectType> {
:
47 | }
48 |
49 | private static func heartReadTypes() -> Set<HKObjectType> {
| `- note: add @available attribute to enclosing static method
50 | var set = Set<HKObjectType>()
51 | if let t = HKObjectType.quantityType(forIdentifier: .heartRate) { set.insert(t) }
| |- error: 'HKObjectType' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
52 | if let t = HKObjectType.quantityType(forIdentifier: .restingHeartRate) { set.insert(t) }
53 | if let t = HKObjectType.quantityType(forIdentifier: .heartRateVariabilitySDNN) { set.insert(t) }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Authorization/HealthKitPermissions.swift:51:62: error: 'heartRate' is only available in macOS 13.0 or newer
15 |
16 | /// Maps ``HealthDataDomain`` values to concrete HealthKit object types for authorization.
17 | public enum HealthKitPermissions: Sendable {
| `- note: add @available attribute to enclosing enum
18 | /// All sample and object types required to read data for the given domains.
19 | public static func objectTypes(for domains: Set<HealthDataDomain>) -> Set<HKObjectType> {
:
47 | }
48 |
49 | private static func heartReadTypes() -> Set<HKObjectType> {
| `- note: add @available attribute to enclosing static method
50 | var set = Set<HKObjectType>()
51 | if let t = HKObjectType.quantityType(forIdentifier: .heartRate) { set.insert(t) }
| |- error: 'heartRate' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
52 | if let t = HKObjectType.quantityType(forIdentifier: .restingHeartRate) { set.insert(t) }
53 | if let t = HKObjectType.quantityType(forIdentifier: .heartRateVariabilitySDNN) { set.insert(t) }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Authorization/HealthKitPermissions.swift:52:20: error: 'HKObjectType' is only available in macOS 13.0 or newer
15 |
16 | /// Maps ``HealthDataDomain`` values to concrete HealthKit object types for authorization.
17 | public enum HealthKitPermissions: Sendable {
| `- note: add @available attribute to enclosing enum
18 | /// All sample and object types required to read data for the given domains.
19 | public static func objectTypes(for domains: Set<HealthDataDomain>) -> Set<HKObjectType> {
:
47 | }
48 |
49 | private static func heartReadTypes() -> Set<HKObjectType> {
| `- note: add @available attribute to enclosing static method
50 | var set = Set<HKObjectType>()
51 | if let t = HKObjectType.quantityType(forIdentifier: .heartRate) { set.insert(t) }
52 | if let t = HKObjectType.quantityType(forIdentifier: .restingHeartRate) { set.insert(t) }
| |- error: 'HKObjectType' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
53 | if let t = HKObjectType.quantityType(forIdentifier: .heartRateVariabilitySDNN) { set.insert(t) }
54 | return set
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Authorization/HealthKitPermissions.swift:52:62: error: 'restingHeartRate' is only available in macOS 13.0 or newer
15 |
16 | /// Maps ``HealthDataDomain`` values to concrete HealthKit object types for authorization.
17 | public enum HealthKitPermissions: Sendable {
| `- note: add @available attribute to enclosing enum
18 | /// All sample and object types required to read data for the given domains.
19 | public static func objectTypes(for domains: Set<HealthDataDomain>) -> Set<HKObjectType> {
:
47 | }
48 |
49 | private static func heartReadTypes() -> Set<HKObjectType> {
| `- note: add @available attribute to enclosing static method
50 | var set = Set<HKObjectType>()
51 | if let t = HKObjectType.quantityType(forIdentifier: .heartRate) { set.insert(t) }
52 | if let t = HKObjectType.quantityType(forIdentifier: .restingHeartRate) { set.insert(t) }
| |- error: 'restingHeartRate' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
53 | if let t = HKObjectType.quantityType(forIdentifier: .heartRateVariabilitySDNN) { set.insert(t) }
54 | return set
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Authorization/HealthKitPermissions.swift:53:20: error: 'HKObjectType' is only available in macOS 13.0 or newer
15 |
16 | /// Maps ``HealthDataDomain`` values to concrete HealthKit object types for authorization.
17 | public enum HealthKitPermissions: Sendable {
| `- note: add @available attribute to enclosing enum
18 | /// All sample and object types required to read data for the given domains.
19 | public static func objectTypes(for domains: Set<HealthDataDomain>) -> Set<HKObjectType> {
:
47 | }
48 |
49 | private static func heartReadTypes() -> Set<HKObjectType> {
| `- note: add @available attribute to enclosing static method
50 | var set = Set<HKObjectType>()
51 | if let t = HKObjectType.quantityType(forIdentifier: .heartRate) { set.insert(t) }
52 | if let t = HKObjectType.quantityType(forIdentifier: .restingHeartRate) { set.insert(t) }
53 | if let t = HKObjectType.quantityType(forIdentifier: .heartRateVariabilitySDNN) { set.insert(t) }
| |- error: 'HKObjectType' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
54 | return set
55 | }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Authorization/HealthKitPermissions.swift:53:62: error: 'heartRateVariabilitySDNN' is only available in macOS 13.0 or newer
15 |
16 | /// Maps ``HealthDataDomain`` values to concrete HealthKit object types for authorization.
17 | public enum HealthKitPermissions: Sendable {
| `- note: add @available attribute to enclosing enum
18 | /// All sample and object types required to read data for the given domains.
19 | public static func objectTypes(for domains: Set<HealthDataDomain>) -> Set<HKObjectType> {
:
47 | }
48 |
49 | private static func heartReadTypes() -> Set<HKObjectType> {
| `- note: add @available attribute to enclosing static method
50 | var set = Set<HKObjectType>()
51 | if let t = HKObjectType.quantityType(forIdentifier: .heartRate) { set.insert(t) }
52 | if let t = HKObjectType.quantityType(forIdentifier: .restingHeartRate) { set.insert(t) }
53 | if let t = HKObjectType.quantityType(forIdentifier: .heartRateVariabilitySDNN) { set.insert(t) }
| |- error: 'heartRateVariabilitySDNN' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
54 | return set
55 | }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Authorization/HealthKitPermissions.swift:58:23: error: 'HKObjectType' is only available in macOS 13.0 or newer
15 |
16 | /// Maps ``HealthDataDomain`` values to concrete HealthKit object types for authorization.
17 | public enum HealthKitPermissions: Sendable {
| `- note: add @available attribute to enclosing enum
18 | /// All sample and object types required to read data for the given domains.
19 | public static func objectTypes(for domains: Set<HealthDataDomain>) -> Set<HKObjectType> {
:
55 | }
56 |
57 | private static func bodyReadTypes() -> Set<HKObjectType> {
| `- note: add @available attribute to enclosing static method
58 | var set = Set<HKObjectType>()
| |- error: 'HKObjectType' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
59 | if let t = HKObjectType.quantityType(forIdentifier: .bodyMass) { set.insert(t) }
60 | if let t = HKObjectType.quantityType(forIdentifier: .bodyMassIndex) { set.insert(t) }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Authorization/HealthKitPermissions.swift:59:20: error: 'HKObjectType' is only available in macOS 13.0 or newer
15 |
16 | /// Maps ``HealthDataDomain`` values to concrete HealthKit object types for authorization.
17 | public enum HealthKitPermissions: Sendable {
| `- note: add @available attribute to enclosing enum
18 | /// All sample and object types required to read data for the given domains.
19 | public static func objectTypes(for domains: Set<HealthDataDomain>) -> Set<HKObjectType> {
:
55 | }
56 |
57 | private static func bodyReadTypes() -> Set<HKObjectType> {
| `- note: add @available attribute to enclosing static method
58 | var set = Set<HKObjectType>()
59 | if let t = HKObjectType.quantityType(forIdentifier: .bodyMass) { set.insert(t) }
| |- error: 'HKObjectType' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
60 | if let t = HKObjectType.quantityType(forIdentifier: .bodyMassIndex) { set.insert(t) }
61 | if let t = HKObjectType.quantityType(forIdentifier: .bodyFatPercentage) { set.insert(t) }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Authorization/HealthKitPermissions.swift:59:62: error: 'bodyMass' is only available in macOS 13.0 or newer
15 |
16 | /// Maps ``HealthDataDomain`` values to concrete HealthKit object types for authorization.
17 | public enum HealthKitPermissions: Sendable {
| `- note: add @available attribute to enclosing enum
18 | /// All sample and object types required to read data for the given domains.
19 | public static func objectTypes(for domains: Set<HealthDataDomain>) -> Set<HKObjectType> {
:
55 | }
56 |
57 | private static func bodyReadTypes() -> Set<HKObjectType> {
| `- note: add @available attribute to enclosing static method
58 | var set = Set<HKObjectType>()
59 | if let t = HKObjectType.quantityType(forIdentifier: .bodyMass) { set.insert(t) }
| |- error: 'bodyMass' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
60 | if let t = HKObjectType.quantityType(forIdentifier: .bodyMassIndex) { set.insert(t) }
61 | if let t = HKObjectType.quantityType(forIdentifier: .bodyFatPercentage) { set.insert(t) }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Authorization/HealthKitPermissions.swift:60:20: error: 'HKObjectType' is only available in macOS 13.0 or newer
15 |
16 | /// Maps ``HealthDataDomain`` values to concrete HealthKit object types for authorization.
17 | public enum HealthKitPermissions: Sendable {
| `- note: add @available attribute to enclosing enum
18 | /// All sample and object types required to read data for the given domains.
19 | public static func objectTypes(for domains: Set<HealthDataDomain>) -> Set<HKObjectType> {
:
55 | }
56 |
57 | private static func bodyReadTypes() -> Set<HKObjectType> {
| `- note: add @available attribute to enclosing static method
58 | var set = Set<HKObjectType>()
59 | if let t = HKObjectType.quantityType(forIdentifier: .bodyMass) { set.insert(t) }
60 | if let t = HKObjectType.quantityType(forIdentifier: .bodyMassIndex) { set.insert(t) }
| |- error: 'HKObjectType' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
61 | if let t = HKObjectType.quantityType(forIdentifier: .bodyFatPercentage) { set.insert(t) }
62 | return set
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Authorization/HealthKitPermissions.swift:60:62: error: 'bodyMassIndex' is only available in macOS 13.0 or newer
15 |
16 | /// Maps ``HealthDataDomain`` values to concrete HealthKit object types for authorization.
17 | public enum HealthKitPermissions: Sendable {
| `- note: add @available attribute to enclosing enum
18 | /// All sample and object types required to read data for the given domains.
19 | public static func objectTypes(for domains: Set<HealthDataDomain>) -> Set<HKObjectType> {
:
55 | }
56 |
57 | private static func bodyReadTypes() -> Set<HKObjectType> {
| `- note: add @available attribute to enclosing static method
58 | var set = Set<HKObjectType>()
59 | if let t = HKObjectType.quantityType(forIdentifier: .bodyMass) { set.insert(t) }
60 | if let t = HKObjectType.quantityType(forIdentifier: .bodyMassIndex) { set.insert(t) }
| |- error: 'bodyMassIndex' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
61 | if let t = HKObjectType.quantityType(forIdentifier: .bodyFatPercentage) { set.insert(t) }
62 | return set
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Authorization/HealthKitPermissions.swift:61:20: error: 'HKObjectType' is only available in macOS 13.0 or newer
15 |
16 | /// Maps ``HealthDataDomain`` values to concrete HealthKit object types for authorization.
17 | public enum HealthKitPermissions: Sendable {
| `- note: add @available attribute to enclosing enum
18 | /// All sample and object types required to read data for the given domains.
19 | public static func objectTypes(for domains: Set<HealthDataDomain>) -> Set<HKObjectType> {
:
55 | }
56 |
57 | private static func bodyReadTypes() -> Set<HKObjectType> {
| `- note: add @available attribute to enclosing static method
58 | var set = Set<HKObjectType>()
59 | if let t = HKObjectType.quantityType(forIdentifier: .bodyMass) { set.insert(t) }
60 | if let t = HKObjectType.quantityType(forIdentifier: .bodyMassIndex) { set.insert(t) }
61 | if let t = HKObjectType.quantityType(forIdentifier: .bodyFatPercentage) { set.insert(t) }
| |- error: 'HKObjectType' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
62 | return set
63 | }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Authorization/HealthKitPermissions.swift:61:62: error: 'bodyFatPercentage' is only available in macOS 13.0 or newer
15 |
16 | /// Maps ``HealthDataDomain`` values to concrete HealthKit object types for authorization.
17 | public enum HealthKitPermissions: Sendable {
| `- note: add @available attribute to enclosing enum
18 | /// All sample and object types required to read data for the given domains.
19 | public static func objectTypes(for domains: Set<HealthDataDomain>) -> Set<HKObjectType> {
:
55 | }
56 |
57 | private static func bodyReadTypes() -> Set<HKObjectType> {
| `- note: add @available attribute to enclosing static method
58 | var set = Set<HKObjectType>()
59 | if let t = HKObjectType.quantityType(forIdentifier: .bodyMass) { set.insert(t) }
60 | if let t = HKObjectType.quantityType(forIdentifier: .bodyMassIndex) { set.insert(t) }
61 | if let t = HKObjectType.quantityType(forIdentifier: .bodyFatPercentage) { set.insert(t) }
| |- error: 'bodyFatPercentage' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
62 | return set
63 | }
[20/20] Compiling HealthSnapKit SleepProvider.swift
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/SleepProvider.swift:40:31: error: 'HKObjectType' is only available in macOS 13.0 or newer
4 | /// Fetches sleep stage summaries grouped into nights.
5 | @MainActor
6 | public final class SleepProvider {
| `- note: add @available attribute to enclosing class
7 | private let store: HealthStoreProtocol
8 |
:
36 |
37 | /// Fetches sleep snapshots for each detected night overlapping `range`.
38 | public func range(_ range: ClosedRange<Date>) async throws -> [SleepSnapshot] {
| `- note: add @available attribute to enclosing instance method
39 | guard store.isHealthDataAvailable() else { throw HealthSnapError.notAvailable }
40 | guard let sleepType = HKObjectType.categoryType(forIdentifier: .sleepAnalysis) else {
| |- error: 'HKObjectType' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
41 | throw HealthSnapError.noData
42 | }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/SleepProvider.swift:40:73: error: 'sleepAnalysis' is only available in macOS 13.0 or newer
4 | /// Fetches sleep stage summaries grouped into nights.
5 | @MainActor
6 | public final class SleepProvider {
| `- note: add @available attribute to enclosing class
7 | private let store: HealthStoreProtocol
8 |
:
36 |
37 | /// Fetches sleep snapshots for each detected night overlapping `range`.
38 | public func range(_ range: ClosedRange<Date>) async throws -> [SleepSnapshot] {
| `- note: add @available attribute to enclosing instance method
39 | guard store.isHealthDataAvailable() else { throw HealthSnapError.notAvailable }
40 | guard let sleepType = HKObjectType.categoryType(forIdentifier: .sleepAnalysis) else {
| |- error: 'sleepAnalysis' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
41 | throw HealthSnapError.noData
42 | }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/SleepProvider.swift:48:25: error: 'HKQuery' is only available in macOS 13.0 or newer
4 | /// Fetches sleep stage summaries grouped into nights.
5 | @MainActor
6 | public final class SleepProvider {
| `- note: add @available attribute to enclosing class
7 | private let store: HealthStoreProtocol
8 |
:
36 |
37 | /// Fetches sleep snapshots for each detected night overlapping `range`.
38 | public func range(_ range: ClosedRange<Date>) async throws -> [SleepSnapshot] {
| `- note: add @available attribute to enclosing instance method
39 | guard store.isHealthDataAvailable() else { throw HealthSnapError.notAvailable }
40 | guard let sleepType = HKObjectType.categoryType(forIdentifier: .sleepAnalysis) else {
:
46 | throw HealthSnapError.noData
47 | }
48 | let predicate = HKQuery.predicateForSamples(withStart: start, end: endExclusive, options: [])
| |- error: 'HKQuery' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
49 | let raw = try await store.samples(
50 | sampleType: sleepType,
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/SleepProvider.swift:53:53: error: 'HKSampleSortIdentifierStartDate' is only available in macOS 13.0 or newer
4 | /// Fetches sleep stage summaries grouped into nights.
5 | @MainActor
6 | public final class SleepProvider {
| `- note: add @available attribute to enclosing class
7 | private let store: HealthStoreProtocol
8 |
:
36 |
37 | /// Fetches sleep snapshots for each detected night overlapping `range`.
38 | public func range(_ range: ClosedRange<Date>) async throws -> [SleepSnapshot] {
| `- note: add @available attribute to enclosing instance method
39 | guard store.isHealthDataAvailable() else { throw HealthSnapError.notAvailable }
40 | guard let sleepType = HKObjectType.categoryType(forIdentifier: .sleepAnalysis) else {
:
51 | predicate: predicate,
52 | limit: HKObjectQueryNoLimit,
53 | sortDescriptors: [NSSortDescriptor(key: HKSampleSortIdentifierStartDate, ascending: true)]
| |- error: 'HKSampleSortIdentifierStartDate' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
54 | )
55 | let samples = raw.compactMap { $0 as? HKCategorySample }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/SleepProvider.swift:55:47: error: 'HKCategorySample' is only available in macOS 13.0 or newer
4 | /// Fetches sleep stage summaries grouped into nights.
5 | @MainActor
6 | public final class SleepProvider {
| `- note: add @available attribute to enclosing class
7 | private let store: HealthStoreProtocol
8 |
:
36 |
37 | /// Fetches sleep snapshots for each detected night overlapping `range`.
38 | public func range(_ range: ClosedRange<Date>) async throws -> [SleepSnapshot] {
| `- note: add @available attribute to enclosing instance method
39 | guard store.isHealthDataAvailable() else { throw HealthSnapError.notAvailable }
40 | guard let sleepType = HKObjectType.categoryType(forIdentifier: .sleepAnalysis) else {
:
53 | sortDescriptors: [NSSortDescriptor(key: HKSampleSortIdentifierStartDate, ascending: true)]
54 | )
55 | let samples = raw.compactMap { $0 as? HKCategorySample }
| |- error: 'HKCategorySample' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
56 | if samples.isEmpty {
57 | throw HealthSnapError.noData
BUILD FAILURE 6.0 macosSpm