FAQ Database Discussion Community


Inactive/invalid connection passed when attempting to take a photo

ios,iphone,swift,avcapturesession,avcapture
I am attempting to take a photo using a custom view (without using UIImagePickerController), but whenever I attempt to take the photo, the app crashes, and this error is thrown: Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[AVCaptureStillImageOutput captureStillImageAsynchronouslyFromConnection:completionHandler:] - inactive/invalid connection passed.' Here's my takePhoto() function, which causes...

Objective-C AVCaptureDevice Front Camera

ios,objective-c,camera,avcapturedevice,avcapture
I have followed a tutorial that guided through a way to make a custom but simple camera app, almost exactly to the needs of the use I would like it. I actually have two issues that I need changing but I will focus on this first one for now. The...

AVCaptureVideoPreviewLayer and preview from camera position

swift,sdk,ios8,avcapture
I'm developing an app that permits user to takes photo. I've started using AVCam apple provides but i'm actually have a problem Simply i cannot position the camera layer where i want but it's positioned automatically on center of the View On the left side you can see what i...

AVFoundation I use setActiveVideoMinFrameDuration didn't work

ios,avfoundation,avcapture
I use AVCaptureVideoDataOutput in my demo ,for take photos in loop (like scanner) without sound, so i set fps to low Level [device setActiveVideoMinFrameDuration:CMTimeMake(1, 1)]; [device setActiveVideoMaxFrameDuration:CMTimeMake(1, 1)]; In my code, then do this - (void)captureOutput:(AVCaptureOutput *)captureOutput didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer fromConnection:(AVCaptureConnection *)connection { NSLog(@"date"); } for check is it work, I found...