I used the ios7 API to scan the QR code, the code below:
AVCaptureMetadataOutput *output = [[AVCaptureMetadataOutput alloc] init]; [self.captureSession addOutput:output]; [output setMetadataObjectsDelegate:self queue:captureOutputBufferQueue]; output.metadataObjectTypes = @[AVMetadataObjectTypeQRCode];
I got crash info from Crashlytics:
NSInvalidArgumentException *** -[AVCaptureMetadataOutput setMetadataObjectTypes:] - unsupported type found. Use - availableMetadataObjectTypes. Thread : Fatal Exception: NSInvalidArgumentException 0 CoreFoundation 0x303b9f83 __exceptionPreprocess + 130 1 libobjc.A.dylib 0x3ab6accf objc_exception_throw + 38 2 AVFoundation 0x2f2f7c29 -[AVCaptureMetadataOutput rectOfInterest]
Has anyone met this?
ios7 qr-code
Ichagall
source share