使用 HealthKit 读取睡眠时间表

huangapple go评论57阅读模式
英文:

Read the sleep schedule using HealthKit

问题

使用健康应用程序,用户可以设定就寝时间和起床时间。

我们可以使用HealthKit框架获取这些数据吗?

我对用户实际在床上度过的时间不感兴趣,而是对用户计划的就寝时间感兴趣,因此需要不同类型的数据。

遗憾的是我在文档中找不到相关信息:https://developer.apple.com/documentation/healthkit/data_types

英文:

Using the Health app, the user can define a bedtime and a wake up time.

Can we get this data using the HealthKit framework?

I'm not interested in the actual time the user spent in bed, but in the time the user scheduled to go to bed, so different kinds of data.

Unfortunately I could not find anything in the documentation: https://developer.apple.com/documentation/healthkit/data_types

答案1

得分: 2

我相当肯定这不在HealthKit中(因为它不是健康记录)。它是Focus系统的一部分,我们几乎无法访问它,除了INFocusStatus.isFocused

英文:

I am fairly certain this is not in HealthKit (since it's not a health record). It's part of the Focus system, and we have extremely little access to that beyond INFocusStatus.isFocused.

huangapple
  • 本文由 发表于 2023年4月19日 23:35:07
  • 转载请务必保留本文链接:https://go.coder-hub.com/76056378.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定