twostraws / CodeScanner

A SwiftUI view that is able to scan barcodes, QR codes, and more, and send back what was found.
MIT License
1.01k stars 286 forks source link

Fatal error: Unexpectedly found nil while implicitly unwrapping an Optional value #72

Closed lovlamba closed 2 years ago

lovlamba commented 2 years ago

The app crashes with this testing it in a physical device. The error comes in the ScannerViewController while passing the session as a parameter.

svpatro commented 2 years ago

This issue has been solved by @uniqby.

Git clone https://github.com/uniqby/CodeScanner.git

Follow this tutorial to create a local dependency: https://www.youtube.com/watch?v=7rFPvj7yu4Q

Replace ScannerViewController.swift with the one from the cloned repository.

Build and run on physical device.