Compare HKSample with another HKSample to prevent duplication
[Swift 3.0]
I am trying to extract HKSample
from HealthKit
in order to add data to my application and would also like to update the application whenever HealthKit.
I added HKObserverQuery
and it works. However, it does not check if it exists HKSample
in my application before adding it and continually adds the sample to my application.
How to check if it exists HKSample
with identical properties?
+3
source to share
1 answer