Hello,
I have enabled HealthKit background delivery for sleep analysis samples:
private func setupSleepDataBackgroundDelivery() {
if let sleepType = HKObjectType.categoryType(forIdentifier: HKCategoryTypeIdentifier.sleepAnalysis) {
healthStore.enableBackgroundDelivery(for: sleepType, frequency: .immediate) { (success, error) in
}
}
}
In general, this function works.
But I would love to know what the limitations / expected delivery delay for frequency: .immediate
is.
The documentation is only very vague about this and specifies that some sample types such as steps are only delivered once per hour.
But how about sleep data? Is this expected to be delivered immediately once available on iPhone?
Thanks a lot for your help!