piemonte / PBJVision

📸 iOS Media Capture – features touch-to-record video, slow motion, and photography
MIT License
1.93k stars 324 forks source link

Capturing a photo is not working, but video is #345

Closed holgersindbaek closed 2 years ago

holgersindbaek commented 6 years ago

I'm trying to capture a photo on my device in the latest version of iOS (10.4.1) and I'm getting the following error:

VISION: error media services failed, error (Error Domain=AVFoundationErrorDomain Code=-11800 "The operation could not be completed" UserInfo={NSLocalizedFailureReason=An unknown error occurred (-16811), NSLocalizedDescription=The operation could not be completed, NSUnderlyingError=0x1c3a42370 {Error Domain=NSOSStatusErrorDomain Code=-16811 "(null)"}})

I'm using the example in the library, where I've changed "PBJCameraModeVideo" to "PBJCameraModePhoto":

https://github.com/piemonte/PBJVision/blob/c09d34f524a9983e97555be92fa01d930d413dc9/Project/Vision/PBJViewController.m

Capturing video seems to work nicely... there I'm getting the video previewed in the view I've made. But in "PBJCameraModePhoto" my view is blank and I'm getting the above error.

Any suggestions as to what's wrong?