While trying to re-create the CIFilterCam demo shown in the WWDC session, I hit a roadblock when trying to access a hardware camera from inside my extension.
Can I simply use an AVCaptureSession
+ AVCaptureDeviceInput
+ AVCaptureVideoDataOutput
to get frames from an actual hardware camera and pass them to the extension's stream? If yes, when should I ask for camera access permissions?
It seems the extension code is run as soon as I install the extension, but I never get prompted for access permission. Do I need to set up the capture session lazily? What's the best practice for this use case?