0

My question is plain and simple. Can i run custom code in the updateHandler when I´ve executed a HKWorkoutSession and is listening for HeartRate samples? (Even when the Watch is locked from "wrist down" movement) If this i possible what are my limitations?

I´m interested in processing the HeartRate data when my code receives them. I don´t have a device yet so I haven't been able to test it yet.

Would love your thoughts on this if anyone have experimented with an actual device.

Philip
  • 2,287
  • 1
  • 22
  • 37

1 Answers1

2

Yes you can do this, I've had it append every HKSample that came back from my query onto an array, so when I resume the array is much larger. However UI won't update this way, on resume you need to update to the values you've received from the updateHandler.

Whether I should be doing this, or how far it can be pushed, I'm not sure.

Update

In the latest Xcode 7 beta you can get simulated workout data, so you won't need to install the Watch OS 2 beta on your device.

William Robinson
  • 1,038
  • 17
  • 32