I am trying to create a nice user experience for doing workouts on my app using an Apple Watch. I can start an HKWorkoutSession on my watch and stop it fine, in the foreground and in the background.
My problem is that the HKObjectQuery does not seem to stop when the watch app is in the background. To clarify, if I lock the watch and the phone for about 3 minutes during a workout and then try to stop stop the workout from the phone app nothing happens.
Any solutions, or even an explanation as to why would be greatly appreciated.