iOS Healthkit record custom workout data

1.5k Views Asked by At

I am trying to figure out if recording strength training workouts to Healthkit is possible? From using the app and going through Apple's sdk, i don't see anything which might let me record weight lifting values (weight used, sets, reps etc.). It seems mostly geared towards calories and running time data types.

Am I missing something or is this not possible? Seems like a very basic thing for any fitness app really to record weight, sets, reps info. If it's not possible via the built in data types, is it possible to created my own custom type? From the docs and another stackoverflow question, I feel like it's not. But can someone confirm if both the above things are not possible?

1

There are 1 best solutions below

1
On BEST ANSWER

Currently, workouts in HealthKit only track active energy burn and distance traveled. You may use one of the strength training HKWorkoutActivityType values (HKWorkoutActivityTypeTraditionalStrengthTraining or HKWorkoutActivityTypeFunctionalStrengthTraining), but there are no sample types for tracking strength training specific activities. Because custom sample types are not supported, if you wanted to build an application today that integrates with HealthKit the best you could do is save a workout with the appropriate type and an active energy burn value and then store the other data in your own application's database or as metadata values on the the HKWorkout.

You should file a bug with Apple if you'd like to have better support for tracking strength training in a future SDK.