英文:
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
.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论