Tyler Martin
Tyler Martin

Reputation: 93

Filling fitness rings with workout session on Apple Watch

Our app seems to have all the pieces in place to fill the fitness rings on Apple Watch:

  1. Workout session starts with activity type HKWorkoutActivityTypeWalking and creates streaming queries for HR, calories and distance.
  2. Samples are stored in arrays
  3. Workout session ends, and, after converting it to an HKWorkout object, is saved to HealthKit
  4. Samples are saved to the HKWorkout object in HealthKit successfully

The workout appears in the Fitness rings app with our app's icon, but in the bar graphs above the Move and Exercise bars don't attribute to our app. What could we be missing?

Thank you!!!

Upvotes: 0

Views: 387

Answers (1)

Allan
Allan

Reputation: 7343

Take a look at this sample code recently posted by Apple. One non-obvious but key step to getting your workouts to show up correctly in the user's Activity graphs is to save your app's own copy of the calorie samples that you want to associate with the workout.

Upvotes: 1

Related Questions