2

Is there a way to monitor how long an iPhone has been unlocked for during a day using Swift?

Daniel Storm
  • 17,279
  • 7
  • 80
  • 145
  • 2
    You can try to calculate it youself using [this](http://stackoverflow.com/questions/7888490/how-can-i-detect-screen-lock-unlock-events-on-the-iphone) and translating it to Swift, but it may lead to a rejection from the App Store. – saagarjha May 09 '16 at 18:22
  • Do you want to check how long it has been unlocked as total or unlocked since the user has used your application? – Rashwan L May 09 '16 at 20:50

1 Answers1

3

Is there a way to monitor how long a phone has been unlocked for during a day

No, because this would require that your app actually be running at unlock time, and of course you can't possibly guarantee that.

matt
  • 485,702
  • 82
  • 818
  • 1,064