Is this possible to make torch lighting when app is in background?
This is what I do to turn it on:
AVCaptureSession *session = [AVCaptureSession new];
AVCaptureDevice *device = [AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeVideo];
[session beginConfiguration];
[device lockForConfiguration:nil];
device.torchMode = AVCaptureTorchModeOn;
[device unlockForConfiguration];
[session commitConfiguration];
[session startRunning];
But when app goes to background torch is automatically turned off. And I cannot get back the light from background.