I am currently using the method:
NSArray *captureDevices = [AVCaptureDevice devicesWithMediaType:AVMediaTypeVideo];
to get a list of devices but X
AVCaptureDevice.default(.builtInWideAngleCamera, for: AVMediaTypeVideo, position: .front)
I think something like that would work. I think the AVCapture.DiscoverySession's initializer may be helpful as well. See the documentation and the stack overflow post on something similar in swift. Let me know if it helped!:)