i just need the period prediction data from health on my apps, but i don't know how. i already tried to get the menstrual flow with HKQuery but thats not data that i wanted. i just can't find the period prediction data (date format).
private func readmens() {
let cycle = HKSampleType.categoryType(forIdentifier: HKCategoryTypeIdentifier.menstrualFlow)
let today = Date()
let startDate = Calendar.current.date(byAdding: .month, value: -3, to: today)
let predicate = HKQuery.predicateForSamples(withStart: startDate, end: today, options: HKQueryOptions.strictEndDate)
let query = HKSampleQuery.init(sampleType: cycle!, predicate: predicate, limit: HKObjectQueryNoLimit, sortDescriptors: nil) { (query, results, error) in print("Menstrual Cycle : ", results) }
HKHealthStore().execute(query)
}