Build Information
Failed to build HealthSnapKit, reference main (6e7adf), with Swift 6.4 for macOS (Xcode) using Xcode 27.0 on 24 Sep 2026 18:20:55 UTC.
Build Command
env DEVELOPER_DIR=/Applications/Xcode-27.0.0-Release.Candidate.app xcrun xcodebuild -IDEClonedSourcePackagesDirPathOverride=$PWD/.dependencies -skipMacroValidation -skipPackagePluginValidation -derivedDataPath $PWD/.derivedData build -scheme HealthSnapKit -destination platform=macOS,arch=arm64Build Log
SwiftCompile normal arm64 /Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/HKError+HealthSnap.swift (in target 'HealthSnapKit' from project 'HealthSnapKit')
cd /Users/admin/builder/spi-builder-workspace/.swiftpm/xcode
builtin-SwiftPerFileCompile HKError+HealthSnap.swift
SwiftCompile normal arm64 /Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/HKQueryAsync.swift (in target 'HealthSnapKit' from project 'HealthSnapKit')
cd /Users/admin/builder/spi-builder-workspace/.swiftpm/xcode
builtin-SwiftPerFileCompile HKQueryAsync.swift
PruneExplicitPrecompiledModules /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/ExplicitPrecompiledModules
PruneExplicitPrecompiledModules /Users/admin/builder/spi-builder-workspace/.derivedData/SDKExplicitPrecompiledModules
PruneExplicitPrecompiledModules /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/SwiftExplicitPrecompiledModules
2026-09-24 14:20:44.503 xcodebuild[627:3887] [MT] IDERunDestination: Supported platforms for the buildables in the current scheme is empty.
--- xcodebuild: WARNING: Using the first of multiple matching destinations:
{ platform:macOS, arch:arm64, id:f1e41f731f00d5d37176d817c1dd07c55f8d96fb, name:My Mac }
{ platform:macOS, arch:arm64, variant:Mac Catalyst, id:f1e41f731f00d5d37176d817c1dd07c55f8d96fb, name:My Mac }
{ platform:macOS, arch:arm64, variant:DriverKit, id:f1e41f731f00d5d37176d817c1dd07c55f8d96fb, name:My Mac }
{ platform:macOS, arch:arm64, variant:Designed for [iPad,iPhone], id:f1e41f731f00d5d37176d817c1dd07c55f8d96fb, name:My Mac }
** BUILD FAILED **
The following build commands failed:
SwiftEmitModule normal arm64 Emitting\ module\ for\ HealthSnapKit (in target 'HealthSnapKit' from project 'HealthSnapKit')
SwiftCompile normal arm64 (in target 'HealthSnapKit' from project 'HealthSnapKit')
Building workspace HealthSnapKit with scheme HealthSnapKit
(3 failures)
Command line invocation:
/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/usr/bin/xcodebuild -IDEClonedSourcePackagesDirPathOverride=/Users/admin/builder/spi-builder-workspace/.dependencies -resolvePackageDependencies
Resolve Package Graph
Resolved source packages:
HealthSnapKit: /Users/admin/builder/spi-builder-workspace
resolved source packages: HealthSnapKit
2026-09-24 14:20:52.000 xcodebuild[720:4392] [MT] IDERunDestination: Supported platforms for the buildables in the current scheme is empty.
{
"dependencies" : [
],
"manifest_display_name" : "HealthSnapKit",
"name" : "HealthSnapKit",
"path" : "/Users/admin/builder/spi-builder-workspace",
"platforms" : [
{
"name" : "ios",
"version" : "17.0"
}
],
"products" : [
{
"name" : "HealthSnapKit",
"targets" : [
"HealthSnapKit"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "HealthSnapKitTests",
"module_type" : "SwiftTarget",
"name" : "HealthSnapKitTests",
"path" : "Tests/HealthSnapKitTests",
"sources" : [
"ActivityProviderTests.swift",
"BodyProviderTests.swift",
"HeartProviderTests.swift",
"MockHealthStore.swift",
"ModelTests.swift",
"SleepProviderTests.swift"
],
"target_dependencies" : [
"HealthSnapKit"
],
"type" : "test"
},
{
"c99name" : "HealthSnapKit",
"module_type" : "SwiftTarget",
"name" : "HealthSnapKit",
"path" : "Sources/HealthSnapKit",
"product_memberships" : [
"HealthSnapKit"
],
"sources" : [
"Authorization/HealthKitPermissions.swift",
"HealthSnapError.swift",
"HealthSnapKit.swift",
"Internal/CalendarDayRange.swift",
"Internal/HKError+HealthSnap.swift",
"Internal/HKQueryAsync.swift",
"Internal/HealthStoreProtocol.swift",
"Internal/LiveHealthStore.swift",
"Internal/SleepAnalysisAggregator.swift",
"Models/ActivitySnapshot.swift",
"Models/BodySnapshot.swift",
"Models/HeartSnapshot.swift",
"Models/SleepSnapshot.swift",
"Providers/ActivityProvider.swift",
"Providers/BodyProvider.swift",
"Providers/HeartProvider.swift",
"Providers/SleepProvider.swift"
],
"type" : "library"
}
],
"tools_version" : "5.9"
}
{
"workspace" : {
"name" : "HealthSnapKit",
"schemes" : [
"HealthSnapKit"
]
}
}
2026-09-24 14:20:53.232 xcodebuild[728:4456] [MT] IDERunDestination: Supported platforms for the buildables in the current scheme is empty.
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-27.0.0-Release.Candidate.app xcrun xcodebuild -IDEClonedSourcePackagesDirPathOverride=$PWD/.dependencies -skipMacroValidation -skipPackagePluginValidation -derivedDataPath $PWD/.derivedData build -scheme HealthSnapKit -destination platform=macOS,arch=arm64
Command line invocation:
/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/usr/bin/xcodebuild -IDEClonedSourcePackagesDirPathOverride=/Users/admin/builder/spi-builder-workspace/.dependencies -skipMacroValidation -skipPackagePluginValidation -derivedDataPath /Users/admin/builder/spi-builder-workspace/.derivedData build -scheme HealthSnapKit -destination platform=macOS,arch=arm64
Resolve Package Graph
Resolved source packages:
HealthSnapKit: /Users/admin/builder/spi-builder-workspace
ComputePackagePrebuildTargetDependencyGraph
Prepare packages
CreateBuildRequest
SendProjectDescription
CreateBuildOperation
ComputeTargetDependencyGraph
note: Building targets in dependency order
note: Target dependency graph (2 targets)
Target 'HealthSnapKit-product' in project 'HealthSnapKit'
➜ Explicit dependency on target 'HealthSnapKit' in project 'HealthSnapKit'
Target 'HealthSnapKit' in project 'HealthSnapKit' (no dependencies)
GatherProvisioningInputs
CreateBuildDescription
ClangStatCache /Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang-stat-cache /Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX27.0.sdk /Users/admin/builder/spi-builder-workspace/.derivedData/SDKStatCaches.noindex/macosx27.0-26A425-e829b21a6f8c9b70876ba0858053c0446a22442a12e9d48fe1a705f55a1adfc4.sdkstatcache
cd /Users/admin/builder/spi-builder-workspace/.swiftpm/xcode
/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang-stat-cache /Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX27.0.sdk -o /Users/admin/builder/spi-builder-workspace/.derivedData/SDKStatCaches.noindex/macosx27.0-26A425-e829b21a6f8c9b70876ba0858053c0446a22442a12e9d48fe1a705f55a1adfc4.sdkstatcache
SwiftDriver HealthSnapKit normal arm64 com.apple.xcode.tools.swift.compiler (in target 'HealthSnapKit' from project 'HealthSnapKit')
cd /Users/admin/builder/spi-builder-workspace/.swiftpm/xcode
builtin-SwiftDriver -- /Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc -parse-as-library -module-name HealthSnapKit -Onone @/Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/HealthSnapKit.build/Debug/HealthSnapKit-t.build/Objects-normal/arm64/HealthSnapKit.SwiftFileList -DSWIFT_PACKAGE -DDEBUG -DSWIFT_MODULE_RESOURCE_BUNDLE_UNAVAILABLE -DXcode -enable-experimental-feature StrictConcurrency -plugin-path /Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/host/plugins/testing -enable-experimental-feature DebugDescriptionMacro -sdk /Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX27.0.sdk -target arm64-apple-macos12.0 -g -module-cache-path /Users/admin/builder/spi-builder-workspace/.derivedData/ModuleCache.noindex -Xfrontend -serialize-debugging-options -profile-coverage-mapping -profile-generate -enable-testing -index-store-path /Users/admin/builder/spi-builder-workspace/.derivedData/Index.noindex/DataStore -Xcc -D_LIBCPP_HARDENING_MODE\=_LIBCPP_HARDENING_MODE_DEBUG -swift-version 5 -I /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Products/Debug -Isystem /Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib -F /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Products/Debug -F /Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks -c -j10 -enable-batch-mode -incremental -Xcc -ivfsstatcache -Xcc /Users/admin/builder/spi-builder-workspace/.derivedData/SDKStatCaches.noindex/macosx27.0-26A425-e829b21a6f8c9b70876ba0858053c0446a22442a12e9d48fe1a705f55a1adfc4.sdkstatcache -output-file-map /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/HealthSnapKit.build/Debug/HealthSnapKit-t.build/Objects-normal/arm64/HealthSnapKit-OutputFileMap.json -save-temps -no-color-diagnostics -explicit-module-build -module-cache-path /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/SwiftExplicitPrecompiledModules -clang-scanner-module-cache-path /Users/admin/builder/spi-builder-workspace/.derivedData/ModuleCache.noindex -sdk-module-cache-path /Users/admin/builder/spi-builder-workspace/.derivedData/SDKExplicitPrecompiledModules -emit-dependencies -emit-module -emit-module-path /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/HealthSnapKit.build/Debug/HealthSnapKit-t.build/Objects-normal/arm64/HealthSnapKit.swiftmodule -serialize-diagnostics -dependency-scan-serialize-diagnostics-path /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/HealthSnapKit.build/Debug/HealthSnapKit-t.build/Objects-normal/arm64/HealthSnapKit-dependency-scan.dia -validate-clang-modules-once -clang-build-session-file /Users/admin/builder/spi-builder-workspace/.derivedData/ModuleCache.noindex/Session.modulevalidation -Xcc -fmodules-prune-interval\=86400 -Xcc -fmodules-prune-after\=345600 -package-name spi_builder_workspace -emit-const-values -const-gather-protocols-list /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/HealthSnapKit.build/Debug/HealthSnapKit-t.build/Objects-normal/arm64/HealthSnapKit_const_extract_protocols.json -Xcc -I/Users/admin/builder/spi-builder-workspace/.derivedData/Build/Products/Debug/include -Xcc -I/Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/HealthSnapKit.build/Debug/HealthSnapKit-t.build/DerivedSources-normal/arm64 -Xcc -I/Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/HealthSnapKit.build/Debug/HealthSnapKit-t.build/DerivedSources/arm64 -Xcc -I/Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/HealthSnapKit.build/Debug/HealthSnapKit-t.build/DerivedSources -Xcc -DSWIFT_PACKAGE -Xcc -DDEBUG\=1 -emit-objc-header -emit-objc-header-path /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/HealthSnapKit.build/Debug/HealthSnapKit-t.build/Objects-normal/arm64/HealthSnapKit-Swift.h -working-directory /Users/admin/builder/spi-builder-workspace/.swiftpm/xcode -experimental-emit-module-separately -disable-cmo
SwiftCompile normal arm64 Compiling\ HKError+HealthSnap.swift,\ HKQueryAsync.swift /Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/HKError+HealthSnap.swift /Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/HKQueryAsync.swift (in target 'HealthSnapKit' from project 'HealthSnapKit')
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/HKError+HealthSnap.swift:4:11: error: 'HKError' is only available in macOS 13.0 or newer
2 | import HealthKit
3 |
4 | extension HKError {
| | `- error: 'HKError' is only available in macOS 13.0 or newer
| `- note: add '@available' attribute to enclosing extension
5 | /// HealthKit uses this when a predicate matches no samples; callers should treat it as empty data, not a hard failure.
6 | static func isNoMatchingSamples(_ error: Error) -> Bool {
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/HKError+HealthSnap.swift:8:29: error: 'HKError' is only available in macOS 13.0 or newer
2 | import HealthKit
3 |
4 | extension HKError {
| `- note: add '@available' attribute to enclosing extension
5 | /// HealthKit uses this when a predicate matches no samples; callers should treat it as empty data, not a hard failure.
6 | static func isNoMatchingSamples(_ error: Error) -> Bool {
| `- note: add '@available' attribute to enclosing static method
7 | let ns = error as NSError
8 | return ns.domain == HKError.errorDomain && ns.code == HKError.Code.errorNoData.rawValue
| |- error: 'HKError' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
9 | }
10 | }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/HKError+HealthSnap.swift:8:63: error: 'HKError' is only available in macOS 13.0 or newer
2 | import HealthKit
3 |
4 | extension HKError {
| `- note: add '@available' attribute to enclosing extension
5 | /// HealthKit uses this when a predicate matches no samples; callers should treat it as empty data, not a hard failure.
6 | static func isNoMatchingSamples(_ error: Error) -> Bool {
| `- note: add '@available' attribute to enclosing static method
7 | let ns = error as NSError
8 | return ns.domain == HKError.errorDomain && ns.code == HKError.Code.errorNoData.rawValue
| |- error: 'HKError' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
9 | }
10 | }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/HKError+HealthSnap.swift:8:76: error: 'errorNoData' is only available in macOS 13.0 or newer
2 | import HealthKit
3 |
4 | extension HKError {
| `- note: add '@available' attribute to enclosing extension
5 | /// HealthKit uses this when a predicate matches no samples; callers should treat it as empty data, not a hard failure.
6 | static func isNoMatchingSamples(_ error: Error) -> Bool {
| `- note: add '@available' attribute to enclosing static method
7 | let ns = error as NSError
8 | return ns.domain == HKError.errorDomain && ns.code == HKError.Code.errorNoData.rawValue
| |- error: 'errorNoData' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
9 | }
10 | }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/HKQueryAsync.swift:7:16: error: 'HKHealthStore' is only available in macOS 13.0 or newer
3 |
4 | /// Async wrappers around completion-handler-based HealthKit queries (used by ``LiveHealthStore``).
5 | enum HKQueryAsync {
| `- note: add '@available' attribute to enclosing enum
6 | static func statisticsCollection(
| `- note: add '@available' attribute to enclosing static method
7 | store: HKHealthStore,
| `- error: 'HKHealthStore' is only available in macOS 13.0 or newer
8 | quantityType: HKQuantityType,
9 | predicate: NSPredicate,
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/HKQueryAsync.swift:8:23: error: 'HKQuantityType' is only available in macOS 13.0 or newer
3 |
4 | /// Async wrappers around completion-handler-based HealthKit queries (used by ``LiveHealthStore``).
5 | enum HKQueryAsync {
| `- note: add '@available' attribute to enclosing enum
6 | static func statisticsCollection(
| `- note: add '@available' attribute to enclosing static method
7 | store: HKHealthStore,
8 | quantityType: HKQuantityType,
| `- error: 'HKQuantityType' is only available in macOS 13.0 or newer
9 | predicate: NSPredicate,
10 | options: HKStatisticsOptions,
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/HKQueryAsync.swift:10:18: error: 'HKStatisticsOptions' is only available in macOS 13.0 or newer
3 |
4 | /// Async wrappers around completion-handler-based HealthKit queries (used by ``LiveHealthStore``).
5 | enum HKQueryAsync {
| `- note: add '@available' attribute to enclosing enum
6 | static func statisticsCollection(
| `- note: add '@available' attribute to enclosing static method
7 | store: HKHealthStore,
8 | quantityType: HKQuantityType,
9 | predicate: NSPredicate,
10 | options: HKStatisticsOptions,
| `- error: 'HKStatisticsOptions' is only available in macOS 13.0 or newer
11 | anchorDate: Date,
12 | intervalComponents: DateComponents
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/HKQueryAsync.swift:13:23: error: 'HKStatisticsCollection' is only available in macOS 13.0 or newer
3 |
4 | /// Async wrappers around completion-handler-based HealthKit queries (used by ``LiveHealthStore``).
5 | enum HKQueryAsync {
| `- note: add '@available' attribute to enclosing enum
6 | static func statisticsCollection(
| `- note: add '@available' attribute to enclosing static method
7 | store: HKHealthStore,
8 | quantityType: HKQuantityType,
:
11 | anchorDate: Date,
12 | intervalComponents: DateComponents
13 | ) async throws -> HKStatisticsCollection {
| `- error: 'HKStatisticsCollection' is only available in macOS 13.0 or newer
14 | try await withCheckedThrowingContinuation { continuation in
15 | let query = HKStatisticsCollectionQuery(
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/HKQueryAsync.swift:42:16: error: 'HKHealthStore' is only available in macOS 13.0 or newer
3 |
4 | /// Async wrappers around completion-handler-based HealthKit queries (used by ``LiveHealthStore``).
5 | enum HKQueryAsync {
| `- note: add '@available' attribute to enclosing enum
6 | static func statisticsCollection(
7 | store: HKHealthStore,
:
39 | }
40 |
41 | static func statistics(
| `- note: add '@available' attribute to enclosing static method
42 | store: HKHealthStore,
| `- error: 'HKHealthStore' is only available in macOS 13.0 or newer
43 | quantityType: HKQuantityType,
44 | predicate: NSPredicate,
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/HKQueryAsync.swift:43:23: error: 'HKQuantityType' is only available in macOS 13.0 or newer
3 |
4 | /// Async wrappers around completion-handler-based HealthKit queries (used by ``LiveHealthStore``).
5 | enum HKQueryAsync {
| `- note: add '@available' attribute to enclosing enum
6 | static func statisticsCollection(
7 | store: HKHealthStore,
:
39 | }
40 |
41 | static func statistics(
| `- note: add '@available' attribute to enclosing static method
42 | store: HKHealthStore,
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/HKQueryAsync.swift:45:18: error: 'HKStatisticsOptions' is only available in macOS 13.0 or newer
3 |
4 | /// Async wrappers around completion-handler-based HealthKit queries (used by ``LiveHealthStore``).
5 | enum HKQueryAsync {
| `- note: add '@available' attribute to enclosing enum
6 | static func statisticsCollection(
7 | store: HKHealthStore,
:
39 | }
40 |
41 | static func statistics(
| `- note: add '@available' attribute to enclosing static method
42 | store: HKHealthStore,
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 withCheckedThrowingContinuation { continuation in
SwiftCompile normal arm64 /Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/HKError+HealthSnap.swift (in target 'HealthSnapKit' from project 'HealthSnapKit')
cd /Users/admin/builder/spi-builder-workspace/.swiftpm/xcode
builtin-SwiftPerFileCompile HKError+HealthSnap.swift
SwiftCompile normal arm64 /Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/HKQueryAsync.swift (in target 'HealthSnapKit' from project 'HealthSnapKit')
cd /Users/admin/builder/spi-builder-workspace/.swiftpm/xcode
builtin-SwiftPerFileCompile HKQueryAsync.swift
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/HKQueryAsync.swift:46:23: error: 'HKStatistics' is only available in macOS 13.0 or newer
3 |
4 | /// Async wrappers around completion-handler-based HealthKit queries (used by ``LiveHealthStore``).
5 | enum HKQueryAsync {
| `- note: add '@available' attribute to enclosing enum
6 | static func statisticsCollection(
7 | store: HKHealthStore,
:
39 | }
40 |
41 | static func statistics(
| `- note: add '@available' attribute to enclosing static method
42 | store: HKHealthStore,
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 withCheckedThrowingContinuation { continuation in
48 | let query = HKStatisticsQuery(quantityType: quantityType, quantitySamplePredicate: predicate, options: options) { _, stats, error in
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/HKQueryAsync.swift:64:16: error: 'HKHealthStore' is only available in macOS 13.0 or newer
3 |
4 | /// Async wrappers around completion-handler-based HealthKit queries (used by ``LiveHealthStore``).
5 | enum HKQueryAsync {
| `- note: add '@available' attribute to enclosing enum
6 | static func statisticsCollection(
7 | store: HKHealthStore,
:
61 | }
62 |
63 | static func samples(
| `- note: add '@available' attribute to enclosing static method
64 | store: HKHealthStore,
| `- error: 'HKHealthStore' is only available in macOS 13.0 or newer
65 | sampleType: HKSampleType,
66 | predicate: NSPredicate,
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/HKQueryAsync.swift:65:21: error: 'HKSampleType' is only available in macOS 13.0 or newer
3 |
4 | /// Async wrappers around completion-handler-based HealthKit queries (used by ``LiveHealthStore``).
5 | enum HKQueryAsync {
| `- note: add '@available' attribute to enclosing enum
6 | static func statisticsCollection(
7 | store: HKHealthStore,
:
61 | }
62 |
63 | static func samples(
| `- note: add '@available' attribute to enclosing static method
64 | store: HKHealthStore,
65 | sampleType: HKSampleType,
| `- error: 'HKSampleType' is only available in macOS 13.0 or newer
66 | predicate: NSPredicate,
67 | limit: Int,
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/HKQueryAsync.swift:69:24: error: 'HKSample' is only available in macOS 13.0 or newer
3 |
4 | /// Async wrappers around completion-handler-based HealthKit queries (used by ``LiveHealthStore``).
5 | enum HKQueryAsync {
| `- note: add '@available' attribute to enclosing enum
6 | static func statisticsCollection(
7 | store: HKHealthStore,
:
61 | }
62 |
63 | static func samples(
| `- note: add '@available' attribute to enclosing static method
64 | store: HKHealthStore,
65 | sampleType: HKSampleType,
:
67 | limit: Int,
68 | sortDescriptors: [NSSortDescriptor]
69 | ) async throws -> [HKSample] {
| `- error: 'HKSample' is only available in macOS 13.0 or newer
70 | try await withCheckedThrowingContinuation { continuation in
71 | let query = HKSampleQuery(
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/HKQueryAsync.swift:24:24: error: 'HKError' is only available in macOS 13.0 or newer
3 |
4 | /// Async wrappers around completion-handler-based HealthKit queries (used by ``LiveHealthStore``).
5 | enum HKQueryAsync {
| `- note: add '@available' attribute to enclosing enum
6 | static func statisticsCollection(
| `- note: add '@available' attribute to enclosing static method
7 | store: HKHealthStore,
8 | quantityType: HKQuantityType,
:
22 | query.initialResultsHandler = { _, collection, error in
23 | if let error {
24 | if HKError.isNoMatchingSamples(error) {
| |- error: 'HKError' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
25 | continuation.resume(throwing: HealthSnapError.noData)
26 | } else {
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/HKQueryAsync.swift:50:24: error: 'HKError' is only available in macOS 13.0 or newer
3 |
4 | /// Async wrappers around completion-handler-based HealthKit queries (used by ``LiveHealthStore``).
5 | enum HKQueryAsync {
| `- note: add '@available' attribute to enclosing enum
6 | static func statisticsCollection(
7 | store: HKHealthStore,
:
39 | }
40 |
41 | static func statistics(
| `- note: add '@available' attribute to enclosing static method
42 | store: HKHealthStore,
43 | quantityType: HKQuantityType,
:
48 | let query = HKStatisticsQuery(quantityType: quantityType, quantitySamplePredicate: predicate, options: options) { _, stats, error in
49 | if let error {
50 | if HKError.isNoMatchingSamples(error) {
| |- error: 'HKError' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
51 | continuation.resume(returning: nil)
52 | } else {
SwiftCompile normal arm64 Compiling\ HealthSnapKit.swift,\ CalendarDayRange.swift /Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/HealthSnapKit.swift /Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/CalendarDayRange.swift (in target 'HealthSnapKit' from project 'HealthSnapKit')
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/HealthSnapKit.swift:8:2: error: 'Observable()' is only available in macOS 14.0 or newer
6 | /// The facade is main-actor isolated so it can be held from SwiftUI without cross-actor `Sendable` requirements.
7 | @MainActor
8 | @Observable
| `- error: 'Observable()' is only available in macOS 14.0 or newer
9 | public final class HealthSnapKit {
10 | private let store: HealthStoreProtocol
macro expansion @Observable:1:2: error: 'ObservationIgnored()' is only available in macOS 14.0 or newer
`- /Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/HealthSnapKit.swift:60:1: note: expanded code originates here
6 | /// The facade is main-actor isolated so it can be held from SwiftUI without cross-actor `Sendable` requirements.
7 | @MainActor
8 | @Observable
| `- note: in expansion of macro 'Observable' on class 'HealthSnapKit' here
9 | public final class HealthSnapKit {
| `- note: add '@available' attribute to enclosing class
10 | private let store: HealthStoreProtocol
11 |
:
58 | }
59 | }
60 | }
+--- macro expansion @Observable ------------------------------------
| 1 | @ObservationIgnored private let _$observationRegistrar = Observation.ObservationRegistrar()
| | `- error: 'ObservationIgnored()' is only available in macOS 14.0 or newer
| 2 |
| 3 | internal nonisolated func access<$s13HealthSnapKitAA10ObservablefMm_6MemberfMu_>(
+--------------------------------------------------------------------
61 |
macro expansion @Observable:1:70: error: 'ObservationRegistrar' is only available in macOS 14.0 or newer
`- /Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/HealthSnapKit.swift:60:1: note: expanded code originates here
6 | /// The facade is main-actor isolated so it can be held from SwiftUI without cross-actor `Sendable` requirements.
7 | @MainActor
8 | @Observable
| `- note: in expansion of macro 'Observable' on class 'HealthSnapKit' here
9 | public final class HealthSnapKit {
| `- note: add '@available' attribute to enclosing class
10 | private let store: HealthStoreProtocol
11 |
:
58 | }
59 | }
60 | }
+--- macro expansion @Observable ------------------------------------
| 1 | @ObservationIgnored private let _$observationRegistrar = Observation.ObservationRegistrar()
| | `- error: 'ObservationRegistrar' is only available in macOS 14.0 or newer
| 2 |
| 3 | internal nonisolated func access<$s13HealthSnapKitAA10ObservablefMm_6MemberfMu_>(
+--------------------------------------------------------------------
61 |
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/HealthSnapKit.swift:8:2: error: 'Observable()' is only available in macOS 14.0 or newer
6 | /// The facade is main-actor isolated so it can be held from SwiftUI without cross-actor `Sendable` requirements.
7 | @MainActor
8 | @Observable
| `- error: 'Observable()' is only available in macOS 14.0 or newer
9 | public final class HealthSnapKit {
| `- note: add '@available' attribute to enclosing class
10 | private let store: HealthStoreProtocol
11 |
SwiftCompile normal arm64 /Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/HealthSnapKit.swift (in target 'HealthSnapKit' from project 'HealthSnapKit')
cd /Users/admin/builder/spi-builder-workspace/.swiftpm/xcode
builtin-SwiftPerFileCompile HealthSnapKit.swift
SwiftCompile normal arm64 /Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/CalendarDayRange.swift (in target 'HealthSnapKit' from project 'HealthSnapKit')
cd /Users/admin/builder/spi-builder-workspace/.swiftpm/xcode
builtin-SwiftPerFileCompile CalendarDayRange.swift
SwiftEmitModule normal arm64 Emitting\ module\ for\ HealthSnapKit (in target 'HealthSnapKit' from project 'HealthSnapKit')
/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/HealthSnapKit.swift:8:2: error: 'Observable()' is only available in macOS 14.0 or newer
6 | /// The facade is main-actor isolated so it can be held from SwiftUI without cross-actor `Sendable` requirements.
7 | @MainActor
8 | @Observable
| `- error: 'Observable()' is only available in macOS 14.0 or newer
9 | public final class HealthSnapKit {
10 | private let store: HealthStoreProtocol
macro expansion @Observable:1:2: error: 'ObservationIgnored()' is only available in macOS 14.0 or newer
`- /Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/HealthSnapKit.swift:60:1: note: expanded code originates here
6 | /// The facade is main-actor isolated so it can be held from SwiftUI without cross-actor `Sendable` requirements.
7 | @MainActor
8 | @Observable
| `- note: in expansion of macro 'Observable' on class 'HealthSnapKit' here
9 | public final class HealthSnapKit {
| `- note: add '@available' attribute to enclosing class
10 | private let store: HealthStoreProtocol
11 |
:
58 | }
59 | }
60 | }
+--- macro expansion @Observable ------------------------------------
| 1 | @ObservationIgnored private let _$observationRegistrar = Observation.ObservationRegistrar()
| | `- error: 'ObservationIgnored()' is only available in macOS 14.0 or newer
| 2 |
| 3 | internal nonisolated func access<$s13HealthSnapKitAA10ObservablefMm_6MemberfMu_>(
+--------------------------------------------------------------------
61 |
macro expansion @Observable:1:70: error: 'ObservationRegistrar' is only available in macOS 14.0 or newer
`- /Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/HealthSnapKit.swift:60:1: note: expanded code originates here
6 | /// The facade is main-actor isolated so it can be held from SwiftUI without cross-actor `Sendable` requirements.
7 | @MainActor
8 | @Observable
| `- note: in expansion of macro 'Observable' on class 'HealthSnapKit' here
9 | public final class HealthSnapKit {
| `- note: add '@available' attribute to enclosing class
10 | private let store: HealthStoreProtocol
11 |
:
58 | }
59 | }
60 | }
+--- macro expansion @Observable ------------------------------------
| 1 | @ObservationIgnored private let _$observationRegistrar = Observation.ObservationRegistrar()
| | `- error: 'ObservationRegistrar' is only available in macOS 14.0 or newer
| 2 |
| 3 | internal nonisolated func access<$s13HealthSnapKitAA10ObservablefMm_6MemberfMu_>(
+--------------------------------------------------------------------
61 |
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/HealthSnapKit.swift:8:2: error: 'Observable()' is only available in macOS 14.0 or newer
6 | /// The facade is main-actor isolated so it can be held from SwiftUI without cross-actor `Sendable` requirements.
7 | @MainActor
8 | @Observable
| `- error: 'Observable()' is only available in macOS 14.0 or newer
9 | public final class HealthSnapKit {
| `- note: add '@available' attribute to enclosing class
10 | private let store: HealthStoreProtocol
11 |
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/HKError+HealthSnap.swift:4:11: error: 'HKError' is only available in macOS 13.0 or newer
2 | import HealthKit
3 |
4 | extension HKError {
| | `- error: 'HKError' is only available in macOS 13.0 or newer
| `- note: add '@available' attribute to enclosing extension
5 | /// HealthKit uses this when a predicate matches no samples; callers should treat it as empty data, not a hard failure.
6 | static func isNoMatchingSamples(_ error: Error) -> Bool {
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/HKQueryAsync.swift:7:16: error: 'HKHealthStore' is only available in macOS 13.0 or newer
3 |
4 | /// Async wrappers around completion-handler-based HealthKit queries (used by ``LiveHealthStore``).
5 | enum HKQueryAsync {
| `- note: add '@available' attribute to enclosing enum
6 | static func statisticsCollection(
| `- note: add '@available' attribute to enclosing static method
7 | store: HKHealthStore,
| `- error: 'HKHealthStore' is only available in macOS 13.0 or newer
8 | quantityType: HKQuantityType,
9 | predicate: NSPredicate,
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/HKQueryAsync.swift:8:23: error: 'HKQuantityType' is only available in macOS 13.0 or newer
3 |
4 | /// Async wrappers around completion-handler-based HealthKit queries (used by ``LiveHealthStore``).
5 | enum HKQueryAsync {
| `- note: add '@available' attribute to enclosing enum
6 | static func statisticsCollection(
| `- note: add '@available' attribute to enclosing static method
7 | store: HKHealthStore,
8 | quantityType: HKQuantityType,
| `- error: 'HKQuantityType' is only available in macOS 13.0 or newer
9 | predicate: NSPredicate,
10 | options: HKStatisticsOptions,
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/HKQueryAsync.swift:10:18: error: 'HKStatisticsOptions' is only available in macOS 13.0 or newer
3 |
4 | /// Async wrappers around completion-handler-based HealthKit queries (used by ``LiveHealthStore``).
5 | enum HKQueryAsync {
| `- note: add '@available' attribute to enclosing enum
6 | static func statisticsCollection(
| `- note: add '@available' attribute to enclosing static method
7 | store: HKHealthStore,
8 | quantityType: HKQuantityType,
9 | predicate: NSPredicate,
10 | options: HKStatisticsOptions,
| `- error: 'HKStatisticsOptions' is only available in macOS 13.0 or newer
11 | anchorDate: Date,
12 | intervalComponents: DateComponents
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/HKQueryAsync.swift:13:23: error: 'HKStatisticsCollection' is only available in macOS 13.0 or newer
3 |
4 | /// Async wrappers around completion-handler-based HealthKit queries (used by ``LiveHealthStore``).
5 | enum HKQueryAsync {
| `- note: add '@available' attribute to enclosing enum
6 | static func statisticsCollection(
| `- note: add '@available' attribute to enclosing static method
7 | store: HKHealthStore,
8 | quantityType: HKQuantityType,
:
11 | anchorDate: Date,
12 | intervalComponents: DateComponents
13 | ) async throws -> HKStatisticsCollection {
| `- error: 'HKStatisticsCollection' is only available in macOS 13.0 or newer
14 | try await withCheckedThrowingContinuation { continuation in
15 | let query = HKStatisticsCollectionQuery(
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/HKQueryAsync.swift:42:16: error: 'HKHealthStore' is only available in macOS 13.0 or newer
3 |
4 | /// Async wrappers around completion-handler-based HealthKit queries (used by ``LiveHealthStore``).
5 | enum HKQueryAsync {
| `- note: add '@available' attribute to enclosing enum
6 | static func statisticsCollection(
7 | store: HKHealthStore,
:
39 | }
40 |
41 | static func statistics(
| `- note: add '@available' attribute to enclosing static method
42 | store: HKHealthStore,
| `- error: 'HKHealthStore' is only available in macOS 13.0 or newer
43 | quantityType: HKQuantityType,
44 | predicate: NSPredicate,
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/HKQueryAsync.swift:43:23: error: 'HKQuantityType' is only available in macOS 13.0 or newer
3 |
4 | /// Async wrappers around completion-handler-based HealthKit queries (used by ``LiveHealthStore``).
5 | enum HKQueryAsync {
| `- note: add '@available' attribute to enclosing enum
6 | static func statisticsCollection(
7 | store: HKHealthStore,
:
39 | }
40 |
41 | static func statistics(
| `- note: add '@available' attribute to enclosing static method
42 | store: HKHealthStore,
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/HKQueryAsync.swift:45:18: error: 'HKStatisticsOptions' is only available in macOS 13.0 or newer
3 |
4 | /// Async wrappers around completion-handler-based HealthKit queries (used by ``LiveHealthStore``).
5 | enum HKQueryAsync {
| `- note: add '@available' attribute to enclosing enum
6 | static func statisticsCollection(
7 | store: HKHealthStore,
:
39 | }
40 |
41 | static func statistics(
| `- note: add '@available' attribute to enclosing static method
42 | store: HKHealthStore,
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 withCheckedThrowingContinuation { continuation in
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/HKQueryAsync.swift:46:23: error: 'HKStatistics' is only available in macOS 13.0 or newer
3 |
4 | /// Async wrappers around completion-handler-based HealthKit queries (used by ``LiveHealthStore``).
5 | enum HKQueryAsync {
| `- note: add '@available' attribute to enclosing enum
6 | static func statisticsCollection(
7 | store: HKHealthStore,
:
39 | }
40 |
41 | static func statistics(
| `- note: add '@available' attribute to enclosing static method
42 | store: HKHealthStore,
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 withCheckedThrowingContinuation { continuation in
48 | let query = HKStatisticsQuery(quantityType: quantityType, quantitySamplePredicate: predicate, options: options) { _, stats, error in
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/HKQueryAsync.swift:64:16: error: 'HKHealthStore' is only available in macOS 13.0 or newer
3 |
4 | /// Async wrappers around completion-handler-based HealthKit queries (used by ``LiveHealthStore``).
5 | enum HKQueryAsync {
| `- note: add '@available' attribute to enclosing enum
6 | static func statisticsCollection(
7 | store: HKHealthStore,
:
61 | }
62 |
63 | static func samples(
| `- note: add '@available' attribute to enclosing static method
64 | store: HKHealthStore,
| `- error: 'HKHealthStore' is only available in macOS 13.0 or newer
65 | sampleType: HKSampleType,
66 | predicate: NSPredicate,
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/HKQueryAsync.swift:65:21: error: 'HKSampleType' is only available in macOS 13.0 or newer
3 |
4 | /// Async wrappers around completion-handler-based HealthKit queries (used by ``LiveHealthStore``).
5 | enum HKQueryAsync {
| `- note: add '@available' attribute to enclosing enum
6 | static func statisticsCollection(
7 | store: HKHealthStore,
:
61 | }
62 |
63 | static func samples(
| `- note: add '@available' attribute to enclosing static method
64 | store: HKHealthStore,
65 | sampleType: HKSampleType,
| `- error: 'HKSampleType' is only available in macOS 13.0 or newer
66 | predicate: NSPredicate,
67 | limit: Int,
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/HKQueryAsync.swift:69:24: error: 'HKSample' is only available in macOS 13.0 or newer
3 |
4 | /// Async wrappers around completion-handler-based HealthKit queries (used by ``LiveHealthStore``).
5 | enum HKQueryAsync {
| `- note: add '@available' attribute to enclosing enum
6 | static func statisticsCollection(
7 | store: HKHealthStore,
:
61 | }
62 |
63 | static func samples(
| `- note: add '@available' attribute to enclosing static method
64 | store: HKHealthStore,
65 | sampleType: HKSampleType,
:
67 | limit: Int,
68 | sortDescriptors: [NSSortDescriptor]
69 | ) async throws -> [HKSample] {
| `- error: 'HKSample' is only available in macOS 13.0 or newer
70 | try await withCheckedThrowingContinuation { continuation in
71 | let query = HKSampleQuery(
/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/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/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/BodyProvider.swift:84:15: error: 'HKUnit' is only available in macOS 13.0 or newer
4 | /// Fetches the most recent body mass, BMI, and body fat percentage samples.
5 | @MainActor
6 | public final class BodyProvider {
| `- note: add '@available' attribute to enclosing class
7 | private let store: HealthStoreProtocol
8 |
:
79 | }
80 |
81 | private func latestSample(
| `- note: add '@available' attribute to enclosing instance method
82 | identifier: HKQuantityTypeIdentifier,
83 | asOf end: Date,
84 | unit: HKUnit
| `- error: 'HKUnit' is only available in macOS 13.0 or newer
85 | ) async throws -> (date: Date, value: Double)? {
86 | guard let type = HKQuantityType.quantityType(forIdentifier: identifier) else {
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/HeartProvider.swift:123:15: error: 'HKUnit' is only available in macOS 13.0 or newer
4 | /// Fetches heart rate averages, resting HR, HRV (SDNN), and per-day samples.
5 | @MainActor
6 | public final class HeartProvider {
| `- note: add '@available' attribute to enclosing class
7 | private let store: HealthStoreProtocol
8 |
:
119 | }
120 |
121 | private func latestQuantity(
| `- note: add '@available' attribute to enclosing instance method
122 | identifier: HKQuantityTypeIdentifier,
123 | unit: HKUnit,
| `- error: 'HKUnit' is only available in macOS 13.0 or newer
124 | from start: Date,
125 | to endExclusive: Date
Failed frontend command:
/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-frontend -frontend -emit-module -experimental-skip-non-inlinable-function-bodies-without-types /Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Authorization/HealthKitPermissions.swift /Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/HealthSnapError.swift /Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/HealthSnapKit.swift /Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/CalendarDayRange.swift /Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/HKError+HealthSnap.swift /Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/HKQueryAsync.swift /Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/HealthStoreProtocol.swift /Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/LiveHealthStore.swift /Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/SleepAnalysisAggregator.swift /Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Models/ActivitySnapshot.swift /Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Models/BodySnapshot.swift /Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Models/HeartSnapshot.swift /Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Models/SleepSnapshot.swift /Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/ActivityProvider.swift /Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/BodyProvider.swift /Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/HeartProvider.swift /Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/SleepProvider.swift -target arm64-apple-macos12.0 -disable-cross-import-overlay-search -load-resolved-plugin /Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib/swift/host/plugins/libFoundationMacros.dylib\#/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/bin/swift-plugin-server\#FoundationMacros -load-resolved-plugin /Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib/swift/host/plugins/libObservationMacros.dylib\#/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/bin/swift-plugin-server\#ObservationMacros -load-resolved-plugin /Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib/swift/host/plugins/libSwiftMacros.dylib\#/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/bin/swift-plugin-server\#SwiftMacros -disable-implicit-swift-modules -Xcc -fno-implicit-modules -Xcc -fno-implicit-module-maps -explicit-swift-module-map-file /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/HealthSnapKit.build/Debug/HealthSnapKit-t.build/Objects-normal/arm64/HealthSnapKit-dependencies-1.json -Xllvm -aarch64-use-tbi -enable-objc-interop -stack-check -sdk /Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX27.0.sdk -I /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Products/Debug -Isystem /Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib -F /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Products/Debug -F /Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks -module-cache-path /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/SwiftExplicitPrecompiledModules -no-color-diagnostics -Xcc -fno-color-diagnostics -enable-testing -g -debug-info-format\=dwarf -dwarf-version\=4 -profile-generate -profile-coverage-mapping -swift-version 5 -Onone -D SWIFT_PACKAGE -D DEBUG -D SWIFT_MODULE_RESOURCE_BUNDLE_UNAVAILABLE -D Xcode -serialize-debugging-options -enable-experimental-feature StrictConcurrency -enable-experimental-feature DebugDescriptionMacro -empty-abi-descriptor -validate-clang-modules-once -clang-build-session-file /Users/admin/builder/spi-builder-workspace/.derivedData/ModuleCache.noindex/Session.modulevalidation -Xcc -working-directory -Xcc /Users/admin/builder/spi-builder-workspace/.swiftpm/xcode -enable-anonymous-context-mangled-names -file-compilation-dir /Users/admin/builder/spi-builder-workspace/.swiftpm/xcode -Xcc -D_LIBCPP_HARDENING_MODE\=_LIBCPP_HARDENING_MODE_DEBUG -Xcc -ivfsstatcache -Xcc /Users/admin/builder/spi-builder-workspace/.derivedData/SDKStatCaches.noindex/macosx27.0-26A425-e829b21a6f8c9b70876ba0858053c0446a22442a12e9d48fe1a705f55a1adfc4.sdkstatcache -Xcc -fmodules-prune-interval\=86400 -Xcc -fmodules-prune-after\=345600 -Xcc -I/Users/admin/builder/spi-builder-workspace/.derivedData/Build/Products/Debug/include -Xcc -I/Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/HealthSnapKit.build/Debug/HealthSnapKit-t.build/DerivedSources-normal/arm64 -Xcc -I/Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/HealthSnapKit.build/Debug/HealthSnapKit-t.build/DerivedSources/arm64 -Xcc -I/Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/HealthSnapKit.build/Debug/HealthSnapKit-t.build/DerivedSources -Xcc -DSWIFT_PACKAGE -Xcc -DDEBUG\=1 -no-auto-bridging-header-chaining -module-name HealthSnapKit -package-name spi_builder_workspace -const-gather-protocols-file /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/HealthSnapKit.build/Debug/HealthSnapKit-t.build/Objects-normal/arm64/HealthSnapKit_const_extract_protocols.json -disable-clang-spi -clang-target arm64-apple-macos27.0 -target-sdk-version 27.0 -target-sdk-name macosx27.0 -in-process-plugin-server-path /Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/host/libSwiftInProcPluginServer.dylib -emit-module-doc-path /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/HealthSnapKit.build/Debug/HealthSnapKit-t.build/Objects-normal/arm64/HealthSnapKit.swiftdoc -emit-module-source-info-path /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/HealthSnapKit.build/Debug/HealthSnapKit-t.build/Objects-normal/arm64/HealthSnapKit.swiftsourceinfo -emit-objc-header-path /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/HealthSnapKit.build/Debug/HealthSnapKit-t.build/Objects-normal/arm64/HealthSnapKit-Swift.h -serialize-diagnostics-path /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/HealthSnapKit.build/Debug/HealthSnapKit-t.build/Objects-normal/arm64/HealthSnapKit-primary-emit-module.dia -emit-dependencies-path /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/HealthSnapKit.build/Debug/HealthSnapKit-t.build/Objects-normal/arm64/HealthSnapKit-primary-emit-module.d -parse-as-library -o /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/HealthSnapKit.build/Debug/HealthSnapKit-t.build/Objects-normal/arm64/HealthSnapKit.swiftmodule -emit-abi-descriptor-path /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/HealthSnapKit.build/Debug/HealthSnapKit-t.build/Objects-normal/arm64/HealthSnapKit.abi.json
SwiftCompile normal arm64 (in target 'HealthSnapKit' from project 'HealthSnapKit')
cd /Users/admin/builder/spi-builder-workspace/.swiftpm/xcode
SwiftCompile normal arm64 Compiling\ BodyProvider.swift /Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/BodyProvider.swift (in target 'HealthSnapKit' from project 'HealthSnapKit')
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/BodyProvider.swift:84:15: error: 'HKUnit' is only available in macOS 13.0 or newer
4 | /// Fetches the most recent body mass, BMI, and body fat percentage samples.
5 | @MainActor
6 | public final class BodyProvider {
| `- note: add '@available' attribute to enclosing class
7 | private let store: HealthStoreProtocol
8 |
:
79 | }
80 |
81 | private func latestSample(
| `- note: add '@available' attribute to enclosing instance method
82 | identifier: HKQuantityTypeIdentifier,
83 | asOf end: Date,
84 | unit: HKUnit
| `- error: 'HKUnit' is only available in macOS 13.0 or newer
85 | ) async throws -> (date: Date, value: Double)? {
86 | guard let type = HKQuantityType.quantityType(forIdentifier: identifier) else {
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/BodyProvider.swift:65:58: error: 'bodyMass' is only available in macOS 13.0 or newer
4 | /// Fetches the most recent body mass, BMI, and body fat percentage samples.
5 | @MainActor
6 | public final class BodyProvider {
| `- note: add '@available' attribute to enclosing class
7 | private let store: HealthStoreProtocol
8 |
:
61 | }
62 |
63 | private func latest(asOf end: Date) async throws -> BodySnapshot {
| `- note: add '@available' attribute to enclosing instance method
64 | guard store.isHealthDataAvailable() else { throw HealthSnapError.notAvailable }
65 | let weight = try await latestSample(identifier: .bodyMass, asOf: end, unit: HKUnit.gramUnit(with: .kilo))
| |- error: 'bodyMass' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
66 | let bmi = try await latestSample(identifier: .bodyMassIndex, asOf: end, unit: HKUnit.count())
67 | let fat = try await latestSample(identifier: .bodyFatPercentage, asOf: end, unit: HKUnit.percent())
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/BodyProvider.swift:65:85: error: 'HKUnit' is only available in macOS 13.0 or newer
4 | /// Fetches the most recent body mass, BMI, and body fat percentage samples.
5 | @MainActor
6 | public final class BodyProvider {
| `- note: add '@available' attribute to enclosing class
7 | private let store: HealthStoreProtocol
8 |
:
61 | }
62 |
63 | private func latest(asOf end: Date) async throws -> BodySnapshot {
| `- note: add '@available' attribute to enclosing instance method
64 | guard store.isHealthDataAvailable() else { throw HealthSnapError.notAvailable }
65 | let weight = try await latestSample(identifier: .bodyMass, asOf: end, unit: HKUnit.gramUnit(with: .kilo))
| |- error: 'HKUnit' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
66 | let bmi = try await latestSample(identifier: .bodyMassIndex, asOf: end, unit: HKUnit.count())
67 | let fat = try await latestSample(identifier: .bodyFatPercentage, asOf: end, unit: HKUnit.percent())
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/BodyProvider.swift:66:55: error: 'bodyMassIndex' is only available in macOS 13.0 or newer
4 | /// Fetches the most recent body mass, BMI, and body fat percentage samples.
5 | @MainActor
6 | public final class BodyProvider {
| `- note: add '@available' attribute to enclosing class
7 | private let store: HealthStoreProtocol
8 |
:
61 | }
62 |
63 | private func latest(asOf end: Date) async throws -> BodySnapshot {
| `- note: add '@available' attribute to enclosing instance method
64 | guard store.isHealthDataAvailable() else { throw HealthSnapError.notAvailable }
65 | let weight = try await latestSample(identifier: .bodyMass, asOf: end, unit: HKUnit.gramUnit(with: .kilo))
66 | let bmi = try await latestSample(identifier: .bodyMassIndex, asOf: end, unit: HKUnit.count())
| |- error: 'bodyMassIndex' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
67 | let fat = try await latestSample(identifier: .bodyFatPercentage, asOf: end, unit: HKUnit.percent())
68 | if weight == nil, bmi == nil, fat == nil {
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/BodyProvider.swift:66:87: error: 'HKUnit' is only available in macOS 13.0 or newer
4 | /// Fetches the most recent body mass, BMI, and body fat percentage samples.
5 | @MainActor
6 | public final class BodyProvider {
| `- note: add '@available' attribute to enclosing class
7 | private let store: HealthStoreProtocol
8 |
:
61 | }
62 |
63 | private func latest(asOf end: Date) async throws -> BodySnapshot {
| `- note: add '@available' attribute to enclosing instance method
64 | guard store.isHealthDataAvailable() else { throw HealthSnapError.notAvailable }
65 | let weight = try await latestSample(identifier: .bodyMass, asOf: end, unit: HKUnit.gramUnit(with: .kilo))
66 | let bmi = try await latestSample(identifier: .bodyMassIndex, asOf: end, unit: HKUnit.count())
| |- error: 'HKUnit' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
67 | let fat = try await latestSample(identifier: .bodyFatPercentage, asOf: end, unit: HKUnit.percent())
68 | if weight == nil, bmi == nil, fat == nil {
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/BodyProvider.swift:67:55: error: 'bodyFatPercentage' is only available in macOS 13.0 or newer
4 | /// Fetches the most recent body mass, BMI, and body fat percentage samples.
5 | @MainActor
6 | public final class BodyProvider {
| `- note: add '@available' attribute to enclosing class
7 | private let store: HealthStoreProtocol
8 |
:
61 | }
62 |
63 | private func latest(asOf end: Date) async throws -> BodySnapshot {
| `- note: add '@available' attribute to enclosing instance method
64 | guard store.isHealthDataAvailable() else { throw HealthSnapError.notAvailable }
65 | let weight = try await latestSample(identifier: .bodyMass, asOf: end, unit: HKUnit.gramUnit(with: .kilo))
66 | let bmi = try await latestSample(identifier: .bodyMassIndex, asOf: end, unit: HKUnit.count())
67 | let fat = try await latestSample(identifier: .bodyFatPercentage, asOf: end, unit: HKUnit.percent())
| |- error: 'bodyFatPercentage' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
68 | if weight == nil, bmi == nil, fat == nil {
69 | throw HealthSnapError.noData
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/BodyProvider.swift:67:91: error: 'HKUnit' is only available in macOS 13.0 or newer
4 | /// Fetches the most recent body mass, BMI, and body fat percentage samples.
5 | @MainActor
6 | public final class BodyProvider {
| `- note: add '@available' attribute to enclosing class
7 | private let store: HealthStoreProtocol
8 |
:
61 | }
62 |
63 | private func latest(asOf end: Date) async throws -> BodySnapshot {
| `- note: add '@available' attribute to enclosing instance method
64 | guard store.isHealthDataAvailable() else { throw HealthSnapError.notAvailable }
65 | let weight = try await latestSample(identifier: .bodyMass, asOf: end, unit: HKUnit.gramUnit(with: .kilo))
66 | let bmi = try await latestSample(identifier: .bodyMassIndex, asOf: end, unit: HKUnit.count())
67 | let fat = try await latestSample(identifier: .bodyFatPercentage, asOf: end, unit: HKUnit.percent())
| |- error: 'HKUnit' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
68 | if weight == nil, bmi == nil, fat == nil {
69 | throw HealthSnapError.noData
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/BodyProvider.swift:86:26: error: 'HKQuantityType' is only available in macOS 13.0 or newer
4 | /// Fetches the most recent body mass, BMI, and body fat percentage samples.
5 | @MainActor
6 | public final class BodyProvider {
| `- note: add '@available' attribute to enclosing class
7 | private let store: HealthStoreProtocol
8 |
:
79 | }
80 |
81 | private func latestSample(
| `- note: add '@available' attribute to enclosing instance method
82 | identifier: HKQuantityTypeIdentifier,
83 | asOf end: Date,
84 | unit: HKUnit
85 | ) async throws -> (date: Date, value: Double)? {
86 | 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
87 | return nil
88 | }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/BodyProvider.swift:89:25: error: 'HKQuery' is only available in macOS 13.0 or newer
4 | /// Fetches the most recent body mass, BMI, and body fat percentage samples.
5 | @MainActor
6 | public final class BodyProvider {
| `- note: add '@available' attribute to enclosing class
7 | private let store: HealthStoreProtocol
8 |
:
79 | }
80 |
81 | private func latestSample(
| `- note: add '@available' attribute to enclosing instance method
82 | identifier: HKQuantityTypeIdentifier,
83 | asOf end: Date,
:
87 | return nil
88 | }
89 | let predicate = HKQuery.predicateForSamples(withStart: Date.distantPast, end: end, options: .strictEndDate)
| |- error: 'HKQuery' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
90 | let samples = try await store.samples(
91 | sampleType: type,
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/BodyProvider.swift:94:53: error: 'HKSampleSortIdentifierEndDate' is only available in macOS 13.0 or newer
4 | /// Fetches the most recent body mass, BMI, and body fat percentage samples.
5 | @MainActor
6 | public final class BodyProvider {
| `- note: add '@available' attribute to enclosing class
7 | private let store: HealthStoreProtocol
8 |
:
79 | }
80 |
81 | private func latestSample(
| `- note: add '@available' attribute to enclosing instance method
82 | identifier: HKQuantityTypeIdentifier,
83 | asOf end: Date,
:
92 | predicate: predicate,
93 | limit: 1,
94 | sortDescriptors: [NSSortDescriptor(key: HKSampleSortIdentifierEndDate, ascending: false)]
| |- error: 'HKSampleSortIdentifierEndDate' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
95 | ).compactMap { $0 as? HKQuantitySample }
96 | guard let sample = samples.first else { return nil }
SwiftCompile normal arm64 /Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/BodyProvider.swift (in target 'HealthSnapKit' from project 'HealthSnapKit')
cd /Users/admin/builder/spi-builder-workspace/.swiftpm/xcode
builtin-SwiftPerFileCompile BodyProvider.swift
SwiftCompile normal arm64 Compiling\ HealthStoreProtocol.swift,\ LiveHealthStore.swift /Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/HealthStoreProtocol.swift /Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/LiveHealthStore.swift (in target 'HealthSnapKit' from project 'HealthSnapKit')
/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,
SwiftCompile normal arm64 /Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/HealthStoreProtocol.swift (in target 'HealthSnapKit' from project 'HealthSnapKit')
cd /Users/admin/builder/spi-builder-workspace/.swiftpm/xcode
builtin-SwiftPerFileCompile HealthStoreProtocol.swift
SwiftCompile normal arm64 /Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/LiveHealthStore.swift (in target 'HealthSnapKit' from project 'HealthSnapKit')
cd /Users/admin/builder/spi-builder-workspace/.swiftpm/xcode
builtin-SwiftPerFileCompile LiveHealthStore.swift
/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,
SwiftCompile normal arm64 Compiling\ HeartProvider.swift /Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/HeartProvider.swift (in target 'HealthSnapKit' from project 'HealthSnapKit')
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/HeartProvider.swift:123:15: error: 'HKUnit' is only available in macOS 13.0 or newer
4 | /// Fetches heart rate averages, resting HR, HRV (SDNN), and per-day samples.
5 | @MainActor
6 | public final class HeartProvider {
| `- note: add '@available' attribute to enclosing class
7 | private let store: HealthStoreProtocol
8 |
:
119 | }
120 |
121 | private func latestQuantity(
| `- note: add '@available' attribute to enclosing instance method
122 | identifier: HKQuantityTypeIdentifier,
123 | unit: HKUnit,
| `- error: 'HKUnit' is only available in macOS 13.0 or newer
124 | from start: Date,
125 | to endExclusive: Date
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/HeartProvider.swift:59:25: error: 'HKQuery' is only available in macOS 13.0 or newer
4 | /// Fetches heart rate averages, resting HR, HRV (SDNN), and per-day samples.
5 | @MainActor
6 | public final class HeartProvider {
| `- note: add '@available' attribute to enclosing class
7 | private let store: HealthStoreProtocol
8 |
:
52 | }
53 |
54 | private func snapshot(for date: Date, calendar: Calendar) async throws -> HeartSnapshot {
| `- note: add '@available' attribute to enclosing instance method
55 | guard store.isHealthDataAvailable() else { throw HealthSnapError.notAvailable }
56 | guard let interval = CalendarDayRange.dayInterval(containing: date, calendar: calendar) else {
57 | throw HealthSnapError.noData
58 | }
59 | 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
60 |
61 | guard let hrType = HKQuantityType.quantityType(forIdentifier: .heartRate) else {
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/HeartProvider.swift:61:28: error: 'HKQuantityType' is only available in macOS 13.0 or newer
4 | /// Fetches heart rate averages, resting HR, HRV (SDNN), and per-day samples.
5 | @MainActor
6 | public final class HeartProvider {
| `- note: add '@available' attribute to enclosing class
7 | private let store: HealthStoreProtocol
8 |
:
52 | }
53 |
54 | private func snapshot(for date: Date, calendar: Calendar) async throws -> HeartSnapshot {
| `- note: add '@available' attribute to enclosing instance method
55 | guard store.isHealthDataAvailable() else { throw HealthSnapError.notAvailable }
56 | guard let interval = CalendarDayRange.dayInterval(containing: date, calendar: calendar) else {
:
59 | let predicate = HKQuery.predicateForSamples(withStart: interval.start, end: interval.endExclusive, options: [])
60 |
61 | guard let hrType = HKQuantityType.quantityType(forIdentifier: .heartRate) else {
| |- error: 'HKQuantityType' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
62 | throw HealthSnapError.noData
63 | }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/HeartProvider.swift:61:72: error: 'heartRate' is only available in macOS 13.0 or newer
4 | /// Fetches heart rate averages, resting HR, HRV (SDNN), and per-day samples.
5 | @MainActor
6 | public final class HeartProvider {
| `- note: add '@available' attribute to enclosing class
7 | private let store: HealthStoreProtocol
8 |
:
52 | }
53 |
54 | private func snapshot(for date: Date, calendar: Calendar) async throws -> HeartSnapshot {
| `- note: add '@available' attribute to enclosing instance method
55 | guard store.isHealthDataAvailable() else { throw HealthSnapError.notAvailable }
56 | guard let interval = CalendarDayRange.dayInterval(containing: date, calendar: calendar) else {
:
59 | let predicate = HKQuery.predicateForSamples(withStart: interval.start, end: interval.endExclusive, options: [])
60 |
61 | guard let hrType = HKQuantityType.quantityType(forIdentifier: .heartRate) else {
| |- error: 'heartRate' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
62 | throw HealthSnapError.noData
63 | }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/HeartProvider.swift:74:53: error: 'HKSampleSortIdentifierStartDate' is only available in macOS 13.0 or newer
4 | /// Fetches heart rate averages, resting HR, HRV (SDNN), and per-day samples.
5 | @MainActor
6 | public final class HeartProvider {
| `- note: add '@available' attribute to enclosing class
7 | private let store: HealthStoreProtocol
8 |
:
52 | }
53 |
54 | private func snapshot(for date: Date, calendar: Calendar) async throws -> HeartSnapshot {
| `- note: add '@available' attribute to enclosing instance method
55 | guard store.isHealthDataAvailable() else { throw HealthSnapError.notAvailable }
56 | guard let interval = CalendarDayRange.dayInterval(containing: date, calendar: calendar) else {
:
72 | predicate: predicate,
73 | limit: HKObjectQueryNoLimit,
74 | sortDescriptors: [NSSortDescriptor(key: HKSampleSortIdentifierStartDate, ascending: true)]
| |- error: 'HKSampleSortIdentifierStartDate' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
75 | )
76 | let samples = sampleList.compactMap { $0 as? HKQuantitySample }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/HeartProvider.swift:76:54: error: 'HKQuantitySample' is only available in macOS 13.0 or newer
4 | /// Fetches heart rate averages, resting HR, HRV (SDNN), and per-day samples.
5 | @MainActor
6 | public final class HeartProvider {
| `- note: add '@available' attribute to enclosing class
7 | private let store: HealthStoreProtocol
8 |
:
52 | }
53 |
54 | private func snapshot(for date: Date, calendar: Calendar) async throws -> HeartSnapshot {
| `- note: add '@available' attribute to enclosing instance method
55 | guard store.isHealthDataAvailable() else { throw HealthSnapError.notAvailable }
56 | guard let interval = CalendarDayRange.dayInterval(containing: date, calendar: calendar) else {
:
74 | sortDescriptors: [NSSortDescriptor(key: HKSampleSortIdentifierStartDate, ascending: true)]
75 | )
76 | let samples = sampleList.compactMap { $0 as? HKQuantitySample }
| |- error: 'HKQuantitySample' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
77 |
78 | if hrStats == nil, samples.isEmpty {
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/HeartProvider.swift:82:23: error: 'HKUnit' is only available in macOS 13.0 or newer
4 | /// Fetches heart rate averages, resting HR, HRV (SDNN), and per-day samples.
5 | @MainActor
6 | public final class HeartProvider {
| `- note: add '@available' attribute to enclosing class
7 | private let store: HealthStoreProtocol
8 |
:
52 | }
53 |
54 | private func snapshot(for date: Date, calendar: Calendar) async throws -> HeartSnapshot {
| `- note: add '@available' attribute to enclosing instance method
55 | guard store.isHealthDataAvailable() else { throw HealthSnapError.notAvailable }
56 | guard let interval = CalendarDayRange.dayInterval(containing: date, calendar: calendar) else {
:
80 | }
81 |
82 | let bpmUnit = HKUnit.count().unitDivided(by: HKUnit.minute())
| |- error: 'HKUnit' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
83 | let average: Double
84 | if let hrStats, let q = hrStats.averageQuantity() {
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/HeartProvider.swift:82:54: error: 'HKUnit' is only available in macOS 13.0 or newer
4 | /// Fetches heart rate averages, resting HR, HRV (SDNN), and per-day samples.
5 | @MainActor
6 | public final class HeartProvider {
| `- note: add '@available' attribute to enclosing class
7 | private let store: HealthStoreProtocol
8 |
:
52 | }
53 |
54 | private func snapshot(for date: Date, calendar: Calendar) async throws -> HeartSnapshot {
| `- note: add '@available' attribute to enclosing instance method
55 | guard store.isHealthDataAvailable() else { throw HealthSnapError.notAvailable }
56 | guard let interval = CalendarDayRange.dayInterval(containing: date, calendar: calendar) else {
:
80 | }
81 |
82 | let bpmUnit = HKUnit.count().unitDivided(by: HKUnit.minute())
| |- error: 'HKUnit' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
83 | let average: Double
84 | if let hrStats, let q = hrStats.averageQuantity() {
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/HeartProvider.swift:94:26: error: 'restingHeartRate' is only available in macOS 13.0 or newer
4 | /// Fetches heart rate averages, resting HR, HRV (SDNN), and per-day samples.
5 | @MainActor
6 | public final class HeartProvider {
| `- note: add '@available' attribute to enclosing class
7 | private let store: HealthStoreProtocol
8 |
:
52 | }
53 |
54 | private func snapshot(for date: Date, calendar: Calendar) async throws -> HeartSnapshot {
| `- note: add '@available' attribute to enclosing instance method
55 | guard store.isHealthDataAvailable() else { throw HealthSnapError.notAvailable }
56 | guard let interval = CalendarDayRange.dayInterval(containing: date, calendar: calendar) else {
:
92 |
93 | let resting = try await latestQuantity(
94 | identifier: .restingHeartRate,
| |- error: 'restingHeartRate' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
95 | unit: bpmUnit,
96 | from: interval.start,
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/HeartProvider.swift:101:26: error: 'heartRateVariabilitySDNN' is only available in macOS 13.0 or newer
4 | /// Fetches heart rate averages, resting HR, HRV (SDNN), and per-day samples.
5 | @MainActor
6 | public final class HeartProvider {
| `- note: add '@available' attribute to enclosing class
7 | private let store: HealthStoreProtocol
8 |
:
52 | }
53 |
54 | private func snapshot(for date: Date, calendar: Calendar) async throws -> HeartSnapshot {
| `- note: add '@available' attribute to enclosing instance method
55 | guard store.isHealthDataAvailable() else { throw HealthSnapError.notAvailable }
56 | guard let interval = CalendarDayRange.dayInterval(containing: date, calendar: calendar) else {
:
99 |
100 | let hrvMs = try await latestQuantity(
101 | identifier: .heartRateVariabilitySDNN,
| |- error: 'heartRateVariabilitySDNN' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
102 | unit: HKUnit.secondUnit(with: .milli),
103 | from: interval.start,
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/HeartProvider.swift:102:19: error: 'HKUnit' is only available in macOS 13.0 or newer
4 | /// Fetches heart rate averages, resting HR, HRV (SDNN), and per-day samples.
5 | @MainActor
6 | public final class HeartProvider {
| `- note: add '@available' attribute to enclosing class
7 | private let store: HealthStoreProtocol
8 |
:
52 | }
53 |
54 | private func snapshot(for date: Date, calendar: Calendar) async throws -> HeartSnapshot {
| `- note: add '@available' attribute to enclosing instance method
55 | guard store.isHealthDataAvailable() else { throw HealthSnapError.notAvailable }
56 | guard let interval = CalendarDayRange.dayInterval(containing: date, calendar: calendar) else {
:
100 | let hrvMs = try await latestQuantity(
101 | identifier: .heartRateVariabilitySDNN,
102 | unit: HKUnit.secondUnit(with: .milli),
| |- error: 'HKUnit' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
103 | from: interval.start,
104 | to: interval.endExclusive
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/HeartProvider.swift:127:26: error: 'HKQuantityType' is only available in macOS 13.0 or newer
4 | /// Fetches heart rate averages, resting HR, HRV (SDNN), and per-day samples.
5 | @MainActor
6 | public final class HeartProvider {
| `- note: add '@available' attribute to enclosing class
7 | private let store: HealthStoreProtocol
8 |
:
119 | }
120 |
121 | private func latestQuantity(
| `- note: add '@available' attribute to enclosing instance method
122 | identifier: HKQuantityTypeIdentifier,
123 | unit: HKUnit,
:
125 | to endExclusive: Date
126 | ) async throws -> Double? {
127 | 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
128 | return nil
129 | }
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/HeartProvider.swift:130:25: error: 'HKQuery' is only available in macOS 13.0 or newer
4 | /// Fetches heart rate averages, resting HR, HRV (SDNN), and per-day samples.
5 | @MainActor
6 | public final class HeartProvider {
| `- note: add '@available' attribute to enclosing class
7 | private let store: HealthStoreProtocol
8 |
:
119 | }
120 |
121 | private func latestQuantity(
| `- note: add '@available' attribute to enclosing instance method
122 | identifier: HKQuantityTypeIdentifier,
123 | unit: HKUnit,
:
128 | return nil
129 | }
130 | 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
131 | let list = try await store.samples(
132 | sampleType: type,
/Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/HeartProvider.swift:135:53: error: 'HKSampleSortIdentifierEndDate' is only available in macOS 13.0 or newer
4 | /// Fetches heart rate averages, resting HR, HRV (SDNN), and per-day samples.
5 | @MainActor
6 | public final class HeartProvider {
| `- note: add '@available' attribute to enclosing class
7 | private let store: HealthStoreProtocol
8 |
:
119 | }
120 |
121 | private func latestQuantity(
| `- note: add '@available' attribute to enclosing instance method
122 | identifier: HKQuantityTypeIdentifier,
123 | unit: HKUnit,
:
133 | predicate: predicate,
134 | limit: 1,
135 | sortDescriptors: [NSSortDescriptor(key: HKSampleSortIdentifierEndDate, ascending: false)]
| |- error: 'HKSampleSortIdentifierEndDate' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
136 | ).compactMap { $0 as? HKQuantitySample }
137 | guard let sample = list.first else { return nil }
SwiftCompile normal arm64 /Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/HeartProvider.swift (in target 'HealthSnapKit' from project 'HealthSnapKit')
cd /Users/admin/builder/spi-builder-workspace/.swiftpm/xcode
builtin-SwiftPerFileCompile HeartProvider.swift
SwiftCompile normal arm64 Compiling\ BodySnapshot.swift,\ HeartSnapshot.swift /Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Models/BodySnapshot.swift /Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Models/HeartSnapshot.swift (in target 'HealthSnapKit' from project 'HealthSnapKit')
SwiftCompile normal arm64 /Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Models/BodySnapshot.swift (in target 'HealthSnapKit' from project 'HealthSnapKit')
cd /Users/admin/builder/spi-builder-workspace/.swiftpm/xcode
builtin-SwiftPerFileCompile BodySnapshot.swift
SwiftCompile normal arm64 /Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Models/HeartSnapshot.swift (in target 'HealthSnapKit' from project 'HealthSnapKit')
cd /Users/admin/builder/spi-builder-workspace/.swiftpm/xcode
builtin-SwiftPerFileCompile HeartSnapshot.swift
SwiftCompile normal arm64 Compiling\ HealthKitPermissions.swift,\ HealthSnapError.swift /Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Authorization/HealthKitPermissions.swift /Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/HealthSnapError.swift (in target 'HealthSnapKit' from project 'HealthSnapKit')
/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 | }
SwiftCompile normal arm64 /Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Authorization/HealthKitPermissions.swift (in target 'HealthSnapKit' from project 'HealthSnapKit')
cd /Users/admin/builder/spi-builder-workspace/.swiftpm/xcode
builtin-SwiftPerFileCompile HealthKitPermissions.swift
SwiftCompile normal arm64 /Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/HealthSnapError.swift (in target 'HealthSnapKit' from project 'HealthSnapKit')
cd /Users/admin/builder/spi-builder-workspace/.swiftpm/xcode
builtin-SwiftPerFileCompile HealthSnapError.swift
SwiftCompile normal arm64 Compiling\ SleepAnalysisAggregator.swift,\ ActivitySnapshot.swift /Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/SleepAnalysisAggregator.swift /Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Models/ActivitySnapshot.swift (in target 'HealthSnapKit' from project 'HealthSnapKit')
/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 {
SwiftCompile normal arm64 /Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Internal/SleepAnalysisAggregator.swift (in target 'HealthSnapKit' from project 'HealthSnapKit')
cd /Users/admin/builder/spi-builder-workspace/.swiftpm/xcode
builtin-SwiftPerFileCompile SleepAnalysisAggregator.swift
SwiftCompile normal arm64 /Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Models/ActivitySnapshot.swift (in target 'HealthSnapKit' from project 'HealthSnapKit')
cd /Users/admin/builder/spi-builder-workspace/.swiftpm/xcode
builtin-SwiftPerFileCompile ActivitySnapshot.swift
SwiftCompile normal arm64 Compiling\ SleepProvider.swift /Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/SleepProvider.swift (in target 'HealthSnapKit' from project 'HealthSnapKit')
/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 }
SwiftCompile normal arm64 /Users/admin/builder/spi-builder-workspace/Sources/HealthSnapKit/Providers/SleepProvider.swift (in target 'HealthSnapKit' from project 'HealthSnapKit')
cd /Users/admin/builder/spi-builder-workspace/.swiftpm/xcode
builtin-SwiftPerFileCompile SleepProvider.swift
PruneExplicitPrecompiledModules /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/ExplicitPrecompiledModules
PruneExplicitPrecompiledModules /Users/admin/builder/spi-builder-workspace/.derivedData/SDKExplicitPrecompiledModules
PruneExplicitPrecompiledModules /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/SwiftExplicitPrecompiledModules
2026-09-24 14:20:54.231 xcodebuild[729:4480] [MT] IDERunDestination: Supported platforms for the buildables in the current scheme is empty.
--- xcodebuild: WARNING: Using the first of multiple matching destinations:
{ platform:macOS, arch:arm64, id:f1e41f731f00d5d37176d817c1dd07c55f8d96fb, name:My Mac }
{ platform:macOS, arch:arm64, variant:Mac Catalyst, id:f1e41f731f00d5d37176d817c1dd07c55f8d96fb, name:My Mac }
{ platform:macOS, arch:arm64, variant:DriverKit, id:f1e41f731f00d5d37176d817c1dd07c55f8d96fb, name:My Mac }
{ platform:macOS, arch:arm64, variant:Designed for [iPad,iPhone], id:f1e41f731f00d5d37176d817c1dd07c55f8d96fb, name:My Mac }
** BUILD FAILED **
The following build commands failed:
SwiftEmitModule normal arm64 Emitting\ module\ for\ HealthSnapKit (in target 'HealthSnapKit' from project 'HealthSnapKit')
SwiftCompile normal arm64 (in target 'HealthSnapKit' from project 'HealthSnapKit')
Building workspace HealthSnapKit with scheme HealthSnapKit
(3 failures)
BUILD FAILURE 6.4 macosXcodebuild