How to get Date Added to Health in Healthkit
Asked Answered
T

1

6

I do not know how can i get the "Date Added to Health" ? I can not find some info about the "Date Added to Health" from HKSample.

Anyone can help me ?

HKSample : HKObject 
    open var sampleType: HKSampleType 
    open var startDate: Date 
    open var endDate: Date 

Only has startDate & endDate, no has "Date Added to Health"

Tswana answered 29/12, 2016 at 7:28 Comment(0)
M
4

There is no API in HealthKit to get the date a sample was added to Health. You should file a bug with Apple if you'd like this feature to be added.

Mezzo answered 30/12, 2016 at 6:27 Comment(1)
A workaround could be to store a date as metadata when added.Oyez

© 2022 - 2024 — McMap. All rights reserved.