简体   繁体   中英

How to get real time Health updates from Apple watch, sync it with health kit and send it to server?

I am working on a iPhone application that consumes health kit data and sends the data to Server whenever i open the iPhone app.

My requirement is whenever there is any change in heart rate, step count etc. from apple Watch(even when watch is locked - black screen), the health kit in iPhone should be updated and the same should be sent to my server as well even when my iPhone app is in background or device is locked. Basically i am trying to send updates to server whenever there is a change in healthkit data. Is this even possible?

I followed this link HealthKit (iOS) won't deliver data in background (objC) to implement Observer Query to fetch heart rate from health kit and it is working only when i unlock the iPhone that too in some interval. I need to invoke this handler whenever there is any updates to healthkit data in watch app even when my iPhone app is in background or phone is locked.

应用程序未运行时的Healthkit后台交付 “用户体验了如何工作每种数据类型的最小频率。”

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM