why does UIImagePickerController.isSourceTypeAvailable(.camera) return true when using the simulator?
This causes the simulator to crash when trying to access the camera.
why does UIImagePickerController.isSourceTypeAvailable(.camera) return true when using the simulator?
This causes the simulator to crash when trying to access the camera.
Copyright © 2021 Jogjafile Inc.
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 presentUIImagePickerControllerwithsourceType = .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. :)