Heart Rate With Apple's Healthkit

前端 未结 2 468
一向
一向 2021-01-22 14:17

I\'m currently using Healthkit in an app and have no problems getting info for most types, but am having trouble with the Heart Rate. Every time I try to read a sample, I get \

2条回答
  •  滥情空心
    2021-01-22 14:48

    if you want to get averageQuantity ask for it in your HKStatisticsQuery options. otherwise it will always be nil (ie. not calculated): options parameter should be set to HKStatisticsOptionDiscreteAverage, NOT HKStatisticsOptionNone

提交回复
热议问题