Scanning Barcodes Using the AV Foundation Framework
- Supported Symbologies
- Creating the Project
- Coding the App
- Testing the App
- Appendix: Code for ScannerViewController.swift
If you're an iOS developer, chances are you're familiar with the AV Foundation Framework. The AV Foundation Framework contains APIs that allow you to play videos as well as audios. In iOS 7, the AV Foundation Framework comes with a very cool new feature—it allows you to use the device's camera to scan one- and two-dimensional barcodes. In this article, I show you how to create an application to use the AV Foundation Framework to perform barcode scanning.
Supported Symbologies
The AV Foundation Framework supports the following barcode symbologies:
- UPCE
- Code 39
- Code 39 Mod 43
- EAN 13
- EAN 8
- Code 93
- Code 128
- PDF 417
- QR Code
- Aztec
- Interleaved 2 of 5 (iOS 8 and later)
- ITF 14 (iOS 8 and later)
- Data Matrix (iOS 8 and later)