From 163e993eb428e4b4bb72af9a148285ab0d436581 Mon Sep 17 00:00:00 2001 From: Trey t Date: Sat, 20 Dec 2025 01:07:35 -0600 Subject: [PATCH] Add State of Mind to HealthService read types MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Include stateOfMindType in the read permissions request so it shows as enabled by default in the HealthKit authorization dialog. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- Shared/Services/HealthService.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Shared/Services/HealthService.swift b/Shared/Services/HealthService.swift index 624e004..e7090d2 100644 --- a/Shared/Services/HealthService.swift +++ b/Shared/Services/HealthService.swift @@ -34,9 +34,10 @@ class HealthService: ObservableObject { private let exerciseTimeType = HKQuantityType.quantityType(forIdentifier: .appleExerciseTime)! private let heartRateType = HKQuantityType.quantityType(forIdentifier: .heartRate)! private let sleepAnalysisType = HKCategoryType.categoryType(forIdentifier: .sleepAnalysis)! + private let stateOfMindType = HKSampleType.stateOfMindType() private var readTypes: Set { - [stepCountType, exerciseTimeType, heartRateType, sleepAnalysisType] + [stepCountType, exerciseTimeType, heartRateType, sleepAnalysisType, stateOfMindType] } // MARK: - Initialization