TMS Software blog: Two lines of code to add QR, UPC, EAN code scanning to your iOS Delphi apps

Posted by on in Blogs
I love it when I can write fewer lines of code and get something done in my applications. I love it even more if I only have to write one or two lines of user-written code to add major functionality to my applications. Here is a cool blog post by TMS Software showing you how you can add barcode scanning (QR, UPC and EAN codes) to your Delphi iOS projects using just two lines of code!!! The TMS iCL component pack provides Delphi components integrate with iOS APIs and in this case, specifically leverage the ZBar open source project.

Two lines of user-written code to add QR, UPC, EAN code scanning in iOS Delphi applications

Read the Blog post -
Uses the TMS iCL component pack -

Here is the code listed in the blog post:
procedure TForm1136.Button1Click(Sender: TObject);
// line1: activate the code scanner. This shows the camera that should be aimed at the QR or UPC

procedure TForm1136.TMSFMXZBarReader1GetResult(Sender: TObject; AResult: string);
//line 2: the OnGetResult event is triggered when the code was retrieved and this returns it as a text
ListBox1.Items.Insert(0, AResult);

The blog post also lists a link to the sample project code -

I love it! Way to go TMS Software, one our premier Embarcadero Technology Partners!

Gold User, Rank: 1, Points: 2466
David Intersimone (known to many as David I.) is a passionate and innovative software industry veteran-often referred to as a developer icon-who extols and educates the world on Embarcadero developer tools. He shares his visions as an active member of the industry speaking circuit and is tapped as an expert source by the media. He is a long-standing champion of architects, developers and database professionals and works to ensure that their needs are folded into Embarcadero's strategic product plans. David holds a bachelor's degree in computer science from California Polytechnic State University at San Luis Obispo, California.


Check out more tips and tricks in this development video: