Skip to content

Conversation

mjrehder
Copy link

@mjrehder mjrehder commented Jan 3, 2017

…ed in unwrapping of nil.
Also added border color change to indicate the issue with a red color.

As stated by Apple, the AVMetadataMachineReadableCodeObject.string can actually be nil and in that case, the previous code would crash.

I have not yet managed to figure out why the QRCode string could not be decoded. I have a particular QRCode from the Hermes Parcel Service with my own full address and that of another person, so I can naturally not attach that for debug purposes :-)
I suspect that either Hermes is doing something weird or there is a problem with the string encoding, which Apples framework does not handle correctly.
I tried to scan the QRCode with the Qrafter App and that actually worked, but I do not know what kind of code scanner it uses.
OK, before this gets tl;dr; - please consider releasing at least the unwrapping safe guard. The overlay border color change is a nice to have (for the user) to see that a code was found but could not be read.

…ed in unwrapping of nil.

Also added border color change to indicate the issue with a red color.
@yannickl
Copy link
Owner

yannickl commented Jan 3, 2017

Thank you for pointing this.

I never had problem with the string decoding before, and I don't know how this is possible. But thank you for the fixing. I'll push a new release this w-e I think. 👍

I believe Qrafter uses its own scanner.

@yannickl yannickl merged commit 06f9e59 into yannickl:master Jan 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants