Search code examples
iosiphoneapple-watchhealthkitheartbeat

Do I need an Apple Watch app to communicate between iPhone and Apple Watch?


I have an iPhone app and I want to get heart rate information from a paired Apple Watch in realtime. My question is that do I need the watch version (or interface) of my iPhone app on the watch in order to communicate with the watch and get information in realtime?

Can you please walk me through the steps in order to make this connection and get realtime data from the watch to the iPhone? Do I need to use healthkit or watch connectivity api in order to do this? I am confused at this point.

Thanks.


Solution

  • This question is already answered over at Apple developer forums

    Basically, watch this video. If you skip to ~32:00 minutes, the keynote speaker called Mark is implementing Healthkit in it's Watch App. The BPM is monitored after authorizing on your iPhone the app may use HealthKit and will refresh the heartbeat every ~4 seconds.

    High level overview:

    • Yes, you will need a watch version of the iPhone app to get realtime data.
    • Create a companion app, and request read access to healthkit heart rate measurement.
    • Then start a workout session from your app

    You may also find this SO link helpful for some sample code: Watch os 2.0 beta: access heart beat rate