why does UIImagePickerController.isSourceTypeAvailable(.camera) return true when using the simulator?
This causes the simulator to crash when trying to access the camera.
This behavior has changed with recent releases.
With Xcode 14.3.1 running the iOS 16.4 Simulator on my M2 MacBook Air, UIImagePickerController.isSourceTypeAvailable(.camera) returns true. When I present UIImagePickerController with sourceType = .camera, it appears but the viewfinder only shows black. Tapping the shutter and flip camera buttons doesn't do anything. Tapping Cancel dismisses it.
Whether or not this is intentional behavior or a bug only Apple could say. :)

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With