Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试使用 HKSampleQuery 通过 healthkit 商店获取心率读数,但我一直在获取 count/s。无论如何我可以通过计数/分钟得到它吗?
Try using something like the following in the completion handler of a HKSampleQuery
HKSampleQuery
let result = results?.last as HKQuantitySample let quantity = result.quantity let count = quantity.doubleValueForUnit(HKUnit(fromString: "count/min"))