2

As you may know, when the iPhone is locked, the HealthKit data gets encrypted, but data may still be added to the HealthStore by the phone (eg. When you are walking, step count will be added even if the phone is locked)

I tried using a HKObserverQuery to check for updates in the HealthStore for the number of steps. But as expected, it failed when the phone the phone is locked.

Is there any alternate way to detect changes in the StepCount data in the HealthStore (By using only the HealthKit functionalities. Not a combination of CoreMotion and HealthKit etc.)

George Santhosh
  • 119
  • 2
  • 13

1 Answers1

1

Unfortunately, no. There is no way to access HealthKit store data while the phone is locked as stated in the documentation and confirmed in the comments of this SO post.

Community
  • 1
  • 1
ospr
  • 1,650
  • 2
  • 17
  • 21
  • If this is limitings features and usability of your app you should consider filing a radar for this. – ospr Jun 05 '15 at 13:50