Barcode Reader using ios app

I want to create an ios app to read barcodes (EAN 13 barcodes).
Is it possible in xojo by just scanning by mobile camera or i need to use some another wireless device to that?
and if it possible any suggestion to do implement it ?

I was working on that, but we have problem with AVFoundation plugin and Xojo compiler.
But once it’s resolved, we may have an example doing barcode scanning.

2 Likes

Hello Christian,
Thanks for your reply, Any idea when you will have example ready ?

We have to wait till Xojo Inc. is working again and can check the problem with me.

Okay, do you know any alternative by which i can do this ?
something like external device from which i can read data into my app.

I would hope we get this fixed next week.

1 Like

My iOSKit has code to do this using AVFoundation and there is an example view. Here is a link to the example. https://github.com/kingj5/iOSKit/blob/master/ExampleViews/AVFoundationViews/BarcodeScannerView.xojo_code

Unfortunately iOSKit faces some compiler errors and deprecation warnings due to the changes of API2 and I haven’t had the time to focus on fixing those.

We used Jason’s code for one of our first projects and it worked flawlessly. I’ll try to make some time to peek at what needs to be upgraded.

1 Like

I have not done this from a Xojo app. But years ago when I needed EAN scans in iOS from another platform, the performance and reliability of the free/low cost solutions available at the time were NOTHING like the scanning I could achieve using a paid scanner SDK. I first used Scandit and later switched to Cognex, both of which scanned much faster, at greater distances, and tolerated poor quality codes much better.

But since that time phone cameras are much higher quality and have faster processors. Plus Apple may have improved their barcode detection algorithms significantly too.

But for barcodes like EAN/UPC (as opposed to say QR which is more or less designed for quick camera scans), I suggest you test your real world conditions against demo programs from Scandit or Cognex. If you always have good quality barcodes with good lighting etc you may not need a paid scanning SDK. But for high volume or poor scan conditions, at least compare the performance against licensed scan SDKs. (Though I have not used those with Xojo either. My apps for clients predate to Xojo support for iOS.)

Scandit is used in many barcode scanning apps and works great. Yuka.io app uses it and has over 30 million users.
It would be good if Christian could make a wrapper for it.

Scandit is very good (see here), and very actively keeps getting better. But pricing for using the SDK is very different when creating an app for consumer use vs creating an app for enterprise use. The low number of devices allowed for a given pricing tier in enterprise use apps (as opposed to consumer use apps) is what pushed me to Cognex.

If you can afford it, Scandit seems like the gold standard for high performance and/or worst environment scans. Which can vary wildly from simple test scans at the developer’s desk. But Cognex saved me money yet provided a significant enough boost for my clients’ conditions versus non-paid SDK scans. As device cameras get better, processors faster, and OS frameworks more intelligent, the day will come where paid SDKs may not be necessary under average conditions.

But the conditions in which Scandit can process barcodes is not likely to be equaled anytime soon by OS provided frameworks. So much still comes down to the environment where it will be used.

I’ve created a branch for API2 on my fork of Jason’s iOSKit library and the project runs in 2020r2.1 now. Mostly what I’ve done is removed the Simple References from the project and fixed everything that broke because of that and then updated the timers to use the new Timer class. You can get it from here:

3 Likes