Determine if a HealthKit operation has been entered manually

You can check which application added activity through the "source" activity. Is there a way to find out if the operation was manually entered or the activity was active, which was recorded in real time from the sensors and added to HealthKit?

+4
source share
1 answer

Apple provides only two properties for the HKSource class, bundleIdentifier and source name , starting with iOS8.x

The package identifier, if made manually, will be com.apple.Health , which is the identifier of the Health application bundle. Pay attention to capital H. When you pull your data, just ignore the data that have the com.apple.Health package identifier.

Thus, you will only consider actions that are not manual.

Hope this helps. Let me know if you need more information.

You can also link to the link here for another way to do this: Ignore entries manually from the Apple Health app as a data source

+4
source

All Articles