title: watchOS 5: HKLiveWorkoutBuilder, HKWorkoutRouteBuilder and Workout Distance
body: <p>I am using <code>HKLiveWorkoutBuilder</code> &amp; <code>HKWorkoutRouteBuilder</code> to track a workout on Apple Watch.</p>
  
  <p>when calling:</p>
  
  <pre><code>[workoutBuilder finishWorkoutWithCompletion:^(HKWorkout * _Nullable workout, NSError * _Nullable error) {
  
  }];
  </code></pre>
  
  <p>The returned <code>workout</code> object does not include the distance that the user travelled:</p>
  
  <pre><code>(lldb) po workout.totalDistance
  nil
  </code></pre>
  
  <p>However the route is saved correctly.</p>
  
  <p>Given that <code>.totalDistance</code> is read only, how should I set the distance of the workout in watchOS 5?</p>
  
  <p><a href="https://i.stack.imgur.com/9LgSA.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/9LgSA.jpg" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/xnTG0.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/xnTG0.jpg" alt="enter image description here"></a></p>