Tom
Tom

Reputation: 175

What is a HealthKit Workout Constant?

What exactly is an HKWorkoutActivityType? For example, how does HKWorkoutActivityTypeRunning differ from HKWorkoutActivityTypeHiking? Are these simply labels or do they use different factors or values for use in calculating active calories or distance?

Upvotes: 0

Views: 95

Answers (1)

rickster
rickster

Reputation: 126177

As you can see from the code examples in HKWorkout Class Reference, any app is free to add workout info to the HealthKit database. So it's just a label, and you can associate any data you want with it. (HealthKit isn't going to audit your data to tell the difference between HKWorkoutActivityTypeTennis and HKWorkoutActivityTypeTableTennis, etc.)

Upvotes: 1

Related Questions