Just so that we understand the terminology βin the backgroundβ correctly, you mean starting the camera capture when your application is in the foreground but does not display the actual video channel. It is possible, but I would like to clarify that if you move the entire application in the background, you will not have access to the camera.
There are several ways to do this, but the one I spent most of all is capturing video frames (or photos) through the AV Foundation. Using AVCaptureDevice and AVCaptureSession, you can capture video frames and send them to the encoder for saving to disk or for processing using your own code. None of this requires the camera channel to be displayed on the screen, so you can use any interface you like and take this video or photograph without any on-screen instructions.
I would warn that you should clearly indicate to your users what you are doing so that you are not at risk of confidentiality. Apple does not kindly respond to those who do this (for a good reason).
I encapsulate a lot of this in an open source GPUImage framework for processing video and photos, so you can look at the code for the GPUImageVideoCamera Class to see how I configure the capture input. I transfer video frames to OpenGL ES for applying filters and other processing operations, but you can ignore this part if you just want to do your own encoding or processing.
source share