Posts

Post not yet marked as solved
36 Views

How to save data in toothbrushingEvent

I want to sync brush time to health,I try healthStore.save,and let categorySample = HKCategorySample(type: categoryType, value: 1, start: start, end: end) but it crashed ,without use value 0. reason:'Value 1 is not compatible with type HKCategoryTypeIdentifierToothbrushingEvent',but i use value 0,it was successed. Successfully saved a new sample! 0 How can i save minute to health. Thanks!Help me please.
Asked
by CloudTop.
Last updated
.