2

There are 2 ways to get step count on iPhone. The first is from actual walking, then iPhone detects the steps. The second one is that a user manually add step data.

Is it possible to find out on HealthKit that the steps come from iPhone but not from a user input?

Pytan
  • 1,138
  • 11
  • 28

1 Answers1

1
let pred = NSPredicate(format: "metadata.%K != YES", HKMetadataKeyWasUserEntered)

Applying above predicate should help.

In case of objective - C

[NSPredicate predicateWithFormat:@"metadata.%K != YES", HKMetadataKeyWasUserEntered];
Iva
  • 2,447
  • 1
  • 18
  • 28