endDate, options: .strictStartDate) // αϯϓϧPredicateΛ࡞ let queryPredicate = HKSamplePredicate.sample(type: HKCategoryType(.sleepAnalysis), predicate: predicate) // ΫΤϦσΟεΫϦϓλΛ࡞ let descriptor = HKSampleQueryDescriptor( predicates: [queryPredicate], // ։࢝࣌ (startDate) Λঢॱ (ݹ͍ॱ) ʹฒସ͑ sortDescriptors: [SortDescriptor(\.startDate, order: .forward)], limit: HKObjectQueryNoLimit // શͯͷαϯϓϧΛऔಘ ) let healthStore = HKHealthStore() do { // ඇಉظͰσʔλΛऔಘ let samples: [HKSample] = try await descriptor.result(for: healthStore) } catch { // Τϥʔॲཧ } ਭऔಘ