QR Code Reading and Generating

For another thread I created a module to read QR Codes, and I have now implemented its complement to create them. Simply call “QRCreator.Create(aString,aWidthAndHeight)” to get a picture with QRCode in an iOSImage with the width and height as specified, and “QRReader.Read(anIOSImage)” to get a string representing the QR Code in the iOSImage. Enjoy!

QRCreator
QRReader

[quote=154960:@Jason King]For another thread I created a module to read QR Codes, and I have now implemented its complement to create them. Simply call “QRCreator.Create(aString,aWidthAndHeight)” to get a picture with QRCode in an iOSImage with the width and height as specified, and “QRReader.Read(anIOSImage)” to get a string representing the QR Code in the iOSImage. Enjoy!

QRCreator
QRReader[/quote]

That is great Jason !

I have been working on the last part of the equation, which is to print the QR code. I think I found a snippet simple enough to be translated to Xojo declares at
http://iphonedevsdk.com/forum/iphone-sdk-development/67176-airprint-tutorial-simple-print-file-30-lines-code.html

Hello Jason,

I’ve tested the QRCreator and it work great but the QRReader doesn’t seem to work.

Am I missing something ?

Alain

Hi Alain,
Please check out the updated versions of the classes which are in iOSKit. The relevant example view is the BarcodeScannerView.
You can find it here:
https://github.com/kingj5/iOSKit

Jason

PS the classes you are trying do actually work, but they require an incredibly clear picture with the code centered in the middle. The new classes using AVFoundation work on the fly and do not require as clear of a picture so they are significantly better to use, although require more setup which is shown in the example.

Hi Jason,

Thanks for your reply.

I’m playing with your iOSKit and am amazed by the number of objects you’ve documented.

Now, if I want to save the QRcode created, how do I proceed to save it temporarily and add it as an attachment using your MFMailComposeView ?

Best regards,
Alain

Found out how to add an attachment but was wondering where does this strange MIME type list comes from ?
public.png ??
Found this : https://en.wikipedia.org/wiki/Uniform_Type_Identifier
Will try to use public.data when it’s not an image…