1

The situation is that the device is locked and lying around until the user grabs the phone to peek on it. When he does that peek, is it possible to detect the event that your iOS device is picked up in the background of your App?

I'm thinking about the event which the system obviously provides, internally at least, for turning on the screen to display the time and notifications on that peek event.

Flupp
  • 856
  • 10
  • 24

1 Answers1

1

iOS does not provide such a public API.
More generally, iOS won't provide any API that could let your app know about user actions on the system or on other apps due to the sandbox even more if your app is not active:

For security reasons, iOS places each app (including its preferences and data) in a sandbox at install time. A sandbox is a set of fine-grained controls that limit the app’s access to files, preferences, network resources, hardware, and so on. As part of the sandboxing process, the system installs each app in its own sandbox directory, which acts as the home for the app and its data.

A few exceptions to this rule exists, like Locations updates.

Quentin Hayot
  • 7,786
  • 6
  • 45
  • 62