watchkitheartbeat

How to get heart rate in watchOS 3+ without using a workout session


I would like to collect the heart rate of the user programmatically by a watchkit extension, but not during a workout session.

As far as I know watchOS 3+ doesn't collect heart rate if the user is moving: however as soon as he's resting for a while (10 minutes ?) I'd like to get somehow the current bpm value by the HealthKit API.


Solution

  • Since you are having a companion iPhone app, you may query heart rate updates from there.

    Notice that the query need to be fire periodically.