I am using a HKWorkoutRouteBuilder to insert route data and then finally save the route and data to HealthKit. This all works fine, but I would also like to get heart rate data from the Apple Watch and save that to HealthKit at the same time.
My question is, to save heart rate data, would I save that as metadata? If so, how do I get the current heart rate from the watch and what metadata key would be used?