【发布时间】:2016-01-26 10:13:49
【问题描述】:
有没有办法从 HealthKit 中获取按“添加到健康的日期”过滤的样本?我想获取比我上次搜索它们的“添加到健康的日期”-Date 更新的每个样本。
我只知道搜索“开始日期”和“结束日期”的方法,但有可能有人添加了过去的样本 (example screenshot)。
// Predicate to search by "Start Date" and "End Date"
let predicate = HKQuery.predicateForSamplesWithStartDate(fromDate, endDate: toDate, options: .None)
【问题讨论】: