Finding HKWorkoutRoute's parent HKWorkout

Given an instance of an HKWorkoutRoute sample, how does one find the HKWorkout that it belongs to?

The preferred approach would be to take an HKWorkout and then create a predicate/query to find associated route samples. I don't think it is possible to go the inverse of that.


Check out this link for details: https://developer.apple.com/documentation/healthkit/workouts_and_activity_rings/reading_route_data


Out of curiosity, how are you getting references to your HKWorkoutRoute objects now?

Finding HKWorkoutRoute's parent HKWorkout
 
 
Q