Trying to access camera hardware using
let deviceDiscoverySession = AVCaptureDevice.DiscoverySession(deviceTypes: [.builtInWideAngleCamera], mediaType: AVMediaType.video, position: AVCaptureDevice.Position.front)
guard let captureDevice = deviceDiscoverySession.devices.first else {
print("Failed to get the camera device")
}
In many devices I get the Failed to get camera device error.
Devices like
iPhone XS
iPhone X
iPhone 7
iPhone 11
iPhone 11 Pro Max
iPhone 8
iPhone14,7
iPhone 12
iPhone XR
iPhone SE (2nd generation)
iPhone 13
iPhone 13 Pro
iPhone 6s
iPhone 6s Plus
Is there a reason why this might happen if the hardware is functioning properly. Please help as a lot of users are facing this issue.
Post
Replies
Boosts
Views
Activity
Is it possible to display the screen same as the size of iphone on Ipad even if the app supports iPad.
Want to prevent resize of screens on iPad for a library even though the app supports iPad.
is that possible?
We are building a framework which will be used by other apps. Want to integrate crash reporting and diagnostics for our framework. Want to report crashes to our backend happening inside our framework only and ignore app level crashes. Is it possible to filter crashes like that ?