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

Unexpectedly found nil while implicitly unwrapping an Optional value #77

Closed ian-sayles closed 2 years ago

ian-sayles commented 2 years ago

On a new device app keeps crashing when asked to give permission to access the camera. It crashes with the following error below, this happens before the 'OK' button is pressed, if you press the OK button, and start the app again it works ok.

CodeScanner/ScannerViewController.swift:178: Fatal error: Unexpectedly found nil while implicitly unwrapping an Optional value 2022-08-12 09:30:14.185667+0100 [405:12472] CodeScanner/ScannerViewController.swift:178: Fatal error: Unexpectedly found nil while implicitly unwrapping an Optional value

if previewLayer == nil { previewLayer = AVCaptureVideoPreviewLayer(session: captureSession) }

The version of Codescanner 2.1.2 and iOS 15.6 and happens on iPad's and iPhone's

nathanfallet commented 2 years ago

Fixed by #73, just need to wait for a release

MartinaRogach commented 2 years ago

Fixed by #73, just need to wait for a release

when do you release this fix?

nathanfallet commented 2 years ago

Fixed by #73, just need to wait for a release

when do you release this fix?

We're waiting for @twostraws to tag a new version

twostraws commented 2 years ago

This has just been done. Sorry for the delay – I'm still on vacation!

nathanfallet commented 2 years ago

Thanks for merging! Have you seen my email about this repository? (Sent on Aug 22 to find it easily)

twostraws commented 2 years ago

@NathanFallet No; I’m on vacation.

nathanfallet commented 2 years ago

@twostraws Yes I know, and I saw you don’t have many time to maintain this repo. That’s why I would like to help you and become a maintainer (“collaborator” on GitHub) on the project. Like I already do with SQLite.swift and CryptoSwift, I can help managing issues (sort, reply, or close if needed), pull requests (review and merge if approved), and releases (create a tag when needed). I already made some contributions on it, and I would love to help more! Tell me what you think about it.

twostraws commented 2 years ago

Okay, let's give it a try! 👍

nathanfallet commented 2 years ago

Thanks! I already fixes some issues. I will follow what's new and do all I can to help.