문제

I need to check periodically if the camera is obscured or not.

I was thinking of doing this by taking pictures periodically and checking them for brightness, if there is any way to let an App take pictures while the App is in background. Apple does this within it's Find my iPhone system, as I've read (taking randomly/secretly photos of the thief). Is there any way of achieving this within an own App?

Or do you have any other idea how to achieve this?

도움이 되었습니까?

해결책

Not in any way while your app is in the background. Here's a list of services allowed while the app is in the background.

You can only, sort of, check the luminosity while your app is active by calculating it from the images you take. Apple does not allow access to the light sensor to apps yet.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top