How to add HKQuantity to HKWorkout

At the moment I am working on a running app for the iPhone.

One issue that I have is, that I am building the HKWorkout using the HKWorkoutBuilder according to Apples Documentation.

But I am not able to associate the totalDistance with the workout – mentioned here in the Documentation. totalDistance is nil when I try to read it from the workout – no surprise.

I think I miss something here.

Probably better to ask over at the Apple-specific developer sites like Apple Developer Forum (HealthKit group). This is about specific Apple frameworks and environments which are not really the subject of these forums.

You are right – thank you. I’ll give it a try.

Terms of Service

Privacy Policy

Cookie Policy