Hi,
I am using HealthKit for the first time.
I am using HKStatisticsCollectionQuery
.
I am running my code iOS 17 on a physical iPhone.
It takes several seconds to query data, for example 1 day worth of heart rate at 1 minute resolution. I changed the resolution to 1 hour, expecting it to be faster, but it's pretty much the same…
I have been following the official documentation and sample code.
I also compiled in Release, but that didn't really help for HKStatisticsCollectionQuery
.
I quickly looked with Instruments, the app is spending a lot of time in decoding data with NSXPCDecoder.
Is there a way to speed data retrieval? Or this is "expected" latency?