5

Suppose I give an app permission to access my camera (and/or microphone) to take a picture. After I take the picture, can the app access my camera without prompting me?

I thought of this while using the Facebook messenger app. The app allows you to take pictures and send them directly into your Facebook messages. Can the app also "look" through my camera while I am scrolling through contacts (or doing anything else unrelated to photos)?

Apologies if this has already been answered.

5
+100

This question over on StackExchange lead me to Apple's iOS Developer Guide, specifically, the background section. This lists the activities apps are aloud to run in the background, camera access is not one of them.

This would also be a terrible condition for battery life and so it is not surprising that it is not supported. While this doesn't guarantee that none of your apps will try to get access to your camera, you can rest assured that if anyone tried to, Apple would reject their app.

This also ensures that there's no API for background camera access, so unless someone has figured out a way to hack non-jail broken iOS at a very low level, we can all sleep safely with only the watchful eye of Siri upon us.

Edit: Per my discussion with timothymh below, I realized you may have been asking about if you are still using a given app, having take a picture without switching to a new app. With more interesting reading from Apple's Developer Guide, we find that the camera API won't hand you data until a picture is taken or a video completed. Because the camera isn't handled by a daemon, it would be very difficult to be constantly polling the camera for input, even if you found a way past the API to get data without user input. Note I'm not an Apple developer, but from an official standpoint, it appears what you're talking about shouldn't be possible.

  • Though, that is referring to when the app is in the background, and the OP is referring to when it is in the foreground, just without it being clear that the camera is being accessed. – Timothy Mueller-Harder Oct 22 '15 at 3:55
  • That's a fair point I apparently overlooked. I assumed the OP meant 'background' when scrolling through contacts was mentioned though I suppose you could be scrolling through your contacts in messenger – agentroadkill Oct 22 '15 at 5:17
  • 3
    More from Apple's Developer Guide (albeit a bit dated), it appears that the camera API will only give you data once you release the camera instance, which means it would be extremely difficult to instantiate a camera let alone get data from it without showing it to the user. I don't imagine Apple would allow this to happen, but then again I don't imagine my parents making love and that apparently happened. – agentroadkill Oct 22 '15 at 5:22
  • 1
    That's good enough for me! :) Add it to your answer; let's see if it's enough info for Joseph. – Timothy Mueller-Harder Oct 22 '15 at 5:23
2

I think the answer is yes, it can. But it is unlikely to happen. To take an image you can use the class UIImagePickerController, which inherits from UINavigationController and UIViewController. On top of that view you can put another view by accessing the property cameraOverlayView.

But there is another option, the AVFoundation, that does not require any output at all. And there is no feedback for the user if the developer does not want to.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .