Skip to content
This repository has been archived by the owner on Oct 10, 2024. It is now read-only.

ios fix: move Optional nil check to prevent unwrapping error #170

Closed

Conversation

minvernizzinextbit
Copy link

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 on stopScan() that crashes the app using this plugin.

@thegnuu
Copy link
Collaborator

thegnuu commented Nov 16, 2022

@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 :)

@thegnuu
Copy link
Collaborator

thegnuu commented Nov 23, 2022

@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!

@thegnuu thegnuu closed this Nov 23, 2022
@minvernizzinextbit
Copy link
Author

Glad I could help! Keep up the amazing work 🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants