Objective c Domain=AVFoundationErrorDomain Code=-11814仅在iPhone 6上发生

Objective c Domain=AVFoundationErrorDomain Code=-11814仅在iPhone 6上发生,objective-c,xcode,video,avfoundation,avcapturedevice,Objective C,Xcode,Video,Avfoundation,Avcapturedevice,我发现AVCaptureDevice出现了一个奇怪的错误,这个错误只发生在iPhone6上。我在iPhone6S和iPad上试用过,效果很好。错误为:Domain=AVFoundationErrorDomain代码=-11814 以下是错误打印输出: Unable to obtain video device input, error: Error Domain=AVFoundationErrorDomain Code=-11814 "Cannot Record" UserInfo={NSLoc

我发现AVCaptureDevice出现了一个奇怪的错误,这个错误只发生在iPhone6上。我在iPhone6S和iPad上试用过,效果很好。错误为:Domain=AVFoundationErrorDomain代码=-11814

以下是错误打印输出:

Unable to obtain video device input, error: Error Domain=AVFoundationErrorDomain Code=-11814 "Cannot Record" UserInfo={NSLocalizedDescription=Cannot Record, NSLocalizedRecoverySuggestion=Try recording again.}
下面是代码片段。视频设备没有回报,因此它跳过了这一点。通常情况下,它能够获得这一点,但iPhone6不能

//get the front camera
NSArray *videoDevices = [AVCaptureDevice devicesWithMediaType:AVMediaTypeVideo];
for (AVCaptureDevice *device in videoDevices)
{
    if (device.position == AVCaptureDevicePositionFront) {
        _videoDevice = device;
        break;
    }
}

// obtain device input
NSError *error = nil;
AVCaptureDeviceInput *videoDeviceInput = [AVCaptureDeviceInput deviceInputWithDevice:_videoDevice error:&error];
if (!videoDeviceInput)
{
    NSLog(@"%@", [NSString stringWithFormat:@"Unable to obtain video device input, error: %@", error]); <--- the print out message is from here.
    return;
}
//取前摄像头
NSArray*videoDevices=[AVCaptureDevicesWithMediaType:AVMediaTypeVideo];
用于(视频设备中的AVCaptureDevice*设备)
{
if(device.position==AVCaptureDevicePositionFront){
_视频设备=设备;
打破
}
}
//获取设备输入
n错误*错误=nil;
AVCaptureDeviceInput*videoDeviceInput=[AVCaptureDeviceInputDeviceInputWithDevice:\u videoDevice error:&error];
如果(!videoDeviceInput)
{

NSLog(@“%@,[NSString stringWithFormat:@”无法获取视频设备输入,错误:%@,错误]);这可能没有多大帮助,但-11814的错误名称是
averordevicentconnected
。似乎AV无法以某种方式建立与设备的连接。system Camera应用程序在该iPhone上工作吗?它与普通的Camera本机应用程序工作。真奇怪,我的其他设备都正常。请在“电话设置”中检查应用程序权限。它是在过去的某个时候,当你在通常的隐私提示下不允许访问时,或者以后,我已经阻止了摄像头访问。在应用程序权限中。我看到摄像头权限已打开。屏幕几乎是白色的。