0

we have a iOS fitness application. We are building a watchOS companion app. We are looking for suggestions on how to architect the following feature.

We want to stream heart rate data back to our iOS app from our watchOS companion app. For example, during a HKworkout on the companion watchOS app, I would like to stream the users heartRate values back to the iOS app to be displayed during the users HKworkout session.

I am able to retrieve the hr data on the watch even if it is running in the background during a HKworkout, but don't know how to livestream the hr data back to the iOS app.

  1. I tried to use TransferUserInfo function to send the data in the background, but it does not work properly. It has budget limitation as well.
  2. Another idea is to use apple healthKit. In other word, send hr data from watchOS to the healthStore (healthKit) then simultaneously have the iOS app pull the data from healthKit. I figured there has to be an easier way to stream live HR data back to an iOS app.

Any ideas, thoughts, or suggestions would be greatly appreciated.

Thanks!

1 Answers1

0

HealthKit isn't a realtime data transport mechanism for apps. If you want to transfer live information collected by your WatchKit app to the iPhone, you need to use WatchConnectivity APIs.

If WatchConnectivity APIs don't work reliably while your app is recording a workout, you should file a bug with Apple.

Allan
  • 7,039
  • 1
  • 16
  • 26