I am having the same issue. As far as I can tell the Apple Watch does NOT store HKSeriesType.heartbeat() ie beat to beat sample time in a workout. I also found that setting the predicate to anything other than nil or HKPredicateForSamples crashes the query.
https://stackoverflow.com/questions/77950041/getting-heartbeatseriessamples-in-ios-swift-healthkit-hkanchoredobjectquery
has anyone solved this? The WWDC video on this https://stackoverflow.com/questions/77950041/getting-heartbeatseriessamples-in-ios-swift-healthkit-hkanchoredobjectquery at around 28 mins assumes you have written the beats from an external device - not from the optical sensor.
Help much appreciated.
Topic:
Programming Languages
SubTopic:
Swift
Tags: