diff --git a/Prisma/Helper/String+HealthKitIdentifier.swift b/Prisma/Helper/String+HealthKitIdentifier.swift index 54fc64a..ea6cff3 100644 --- a/Prisma/Helper/String+HealthKitIdentifier.swift +++ b/Prisma/Helper/String+HealthKitIdentifier.swift @@ -13,8 +13,8 @@ extension String { /// converts a HKSample Type string representation to a lower cased id. /// e.g. "HKQuantityTypeIdentifierStepCount" => "stepcount". var healthKitDescription: String { - if self == "workout" { - return self + if self == "workout" || self == "HKWorkoutTypeIdentifier" { + return "workout" } let prefixes = ["HKQuantityTypeIdentifier", "HKCategoryTypeIdentifier", "HKCorrelationTypeIdentifier", "HKWorkoutTypeIdentifier"] diff --git a/Prisma/PrismaDelegate.swift b/Prisma/PrismaDelegate.swift index c583fe5..14856ef 100644 --- a/Prisma/PrismaDelegate.swift +++ b/Prisma/PrismaDelegate.swift @@ -99,7 +99,7 @@ class PrismaDelegate: SpeziAppDelegate { Set(PrismaDelegate.healthKitSampleTypes), /// predicate to request data from one month in the past to present. predicate: HKQuery.predicateForSamples( - withStart: Calendar.current.date(byAdding: .month, value: -1, to: .now), + withStart: Calendar.current.date(byAdding: .month, value: -6, to: .now), end: nil, options: .strictEndDate ),