Active Camera Detection

I need to detect when another application is using the iPhone / iPad camera while my application is running. My application continues to run in the background (audio), but it does not use the camera. I just need to find out if another application is using any camera.

In addition, I want to use as little CPU as possible to minimize battery usage.

I tried without success:

  • launching an easy AVCaptureSessionto detect interrupt (it is never notified)
  • call lockForConfigurationon all AVCaptureDevices
  • periodically track a property enabled AVCaptureInputPort(it is always YES)
  • periodically track a property connected AVCaptureDevice(it is always YES)

For clarification:

  • I do not need a way to detect the existence of a camera.
  • I don't need a way to find out if the camera is active in my application.

Thanks for any pointers.

EDIT: this security feature: I want to warn the user if there is a slight chance that the malicious (front) application is taking photos or videos of the user or the environment while my application is actively (background) using.

+5
source share
1 answer

iOS , , . , Apple . , , , : ) , , b) . , , , , .

+3

All Articles