How to request HealthKit permissions for HKWorkout type?

269 Views Asked by At

I am working with HKWorkout for the same time, and I'm not clearly seeing how these types work. I am used to HKQuantityType but this is not a direct translation. In particular, how can I request permission to read certain types in the HKStore? In particular I am trying to request permission for HKWorkoutActivityTypeEquestrianSports but I am not managing to produce the correct type of object.

1

There are 1 best solutions below

0
On

You should simply request authorization to read/write samples of the HKWorkout sample type. There are not fine-grained authorization controls for each individual activity type, such as HKWorkoutActivityTypeEquestrianSports, in HealthKit.