QRCodeReader.swift
QRCodeReader.swift copied to clipboard
Example App crashes on iOS 10.0 - Thread 1: EXC_BAD_ACCESS (code=1, address=0x50)
public init(metadataObjectTypes types: [AVMetadataObject.ObjectType], captureDevicePosition: AVCaptureDevice.Position) {
metadataObjectTypes = types
previewLayer = AVCaptureVideoPreviewLayer(session: session) - CRASHED LINE
super.init()
sessionQueue.async {
self.configureDefaultComponents(withCaptureDevicePosition: captureDevicePosition)
}
}
I have no device with iOS10. Could someone help?
@yannickl I downloaded iOS 10.0 in Xcode and run it in simulator
@artoymsd but you can't use the camera with the simulator? Have you checked the permissions and the camera availability before?
try QRCodeReader.supportsMetadataObjectTypes()