Add State of Mind to HealthService read types
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 <noreply@anthropic.com>
This commit is contained in:
@@ -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<HKObjectType> {
|
||||
[stepCountType, exerciseTimeType, heartRateType, sleepAnalysisType]
|
||||
[stepCountType, exerciseTimeType, heartRateType, sleepAnalysisType, stateOfMindType]
|
||||
}
|
||||
|
||||
// MARK: - Initialization
|
||||
|
||||
Reference in New Issue
Block a user