Chapter 1. Barcodes, iOS, and you

 

This chapter covers

  • Why the nexus of barcodes and mobile technologies is creating new, exciting opportunities for app makers
  • The barcode symbologies in iOS you should know about
  • The distinctions between 1D and 2D barcodes
  • A brief history of the UPC/GTIN, the mother of modern barcodes

In the past, if you wanted to add barcode scanning to your apps, you had to either fight your way through open source projects or license a commercial barcode-scanning library. None of those projects were written in Objective-C, documentation was lacking, and commercial solutions required payment of license fees for each downloaded copy of your app. All of these issues made barcode scanning impractical for all but the most skilled iOS developers, and too expensive to make economic sense for free or low-cost apps.

When Apple added Passbook to iOS 6, they built in the ability to display barcodes on Passbook passes. With iOS 7, Apple made these APIs public and added the ability to scan barcodes. This allowed them to add barcode-scanning functionality to several of their first-party apps:

  • The Passbook app lets you add new passes to your device by scanning special QR Codes.
  • The iTunes app has the ability to redeem iTunes credits by scanning a voucher.
  • The Apple Store app has an in-store UI that lets you scan the barcodes of accessories for unassisted checkout (see figure 1.1).
Figure 1.1. Barcode scanning in the Apple Store app

1.1. The evolution of barcodes

1.2. Barcode symbologies in iOS

1.3. Summary

sitemap