The code in updateHanlder (HealthKit) did not work when the clock goes into the background

When the β€œclock” screen is on, I can get feedback information (heart rate data) from the updateHanlder block and make some user interface settings (tactile vibration or label setting). However, when I remove my wrist and the screen turns off, I cannot get NSLoged information from the updateHanlder block. I’m sure that the heart rate sensor is still working, and the health app in the iOS client shows that the heart rate data has been reached.

Does anyone know how to solve this problem?

+4
source share

All Articles