appcoda/TextDetection

Error

stevenelliscox opened this issue · 1 comments

Thank you for this great tutorial!!!! Forgive me as I am VERY new to coding but I'm getting an error in the debugger:

fatal error: unexpectedly found nil while unwrapping an Optional value
2017-10-27 17:08:23.327262-0700 Text Detection Starter Project[64841:23007382] fatal error: unexpectedly found nil while unwrapping an Optional value

It seems the problem lies here?:
let deviceInput = try! AVCaptureDeviceInput(device: captureDevice!)
which gives me the error:

Thread 1: EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)

I'm running Xcode v9.0.1 and Swift 4
Any help is appreciated for this dumb guy. Thanks!!!

use camera permission added in plist?