Closed minvernizzinextbit closed 1 year ago
@minvernizzinextbit thank you for your PR! I will do my best to have a look at this today! Hopefully I will find time to check it out :)
@minvernizzinextbit I had to copy your changes to the main
branch since I am unable to merge non-verified commits, but your changes are released in v3.0.1
.
Thank you very much!
Glad I could help! Keep up the amazing work 🚀
Hi @thegnuu. First of all, thanks for your work on this super helpful plugin! I really appreciate all the effort you (and other maintainers) put into this. I recently updated the plugin to make it work with XCode 14 and Capacitor 4 and after running my tests I found that the app was crashing after closing the BarcodeScanner instance. After looking into it I realized that a small change in the swift code would solve the issue. I'm not an expert Swift developer so I might have missed something else, but after the fix the plugin seems to work as expected. Any feedback would be really appreciated.
This small fix moves the Optional nil check inside
DispatchQueue
to prevent an unwrapping error onstopScan()
that crashes the app using this plugin.