Skip to content
Parse barcodes on North American ID cards encoded using AAMVA standard
Swift Other
  1. Swift 98.5%
  2. Other 1.5%
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
AAMVA Barcode Parser.xcodeproj
AAMVA Barcode Parser
AAMVA Barcode ParserTests

AAMVA Barcode Parser

Parse barcodes on North American ID cards encoded using AAMVA standard.


  1. Install CocoaPods.

  2. Add a file called Podfile in your project's root folder.

  3. Refer to the Podfile reference documentation to set up your Podfile.

  4. Add the AAMVA Barcode Parser dependency in your Podfile:

    pod 'AAMVA-Barcode-Parser', '~> 1'
  5. Open Terminal, navigate to the folder with your Podfile and enter:

    pod install


import AAMVABarcodeParser

/// Parse barcode data
/// - Parameter barcodeData: Barcode data scanned from the back of a North American ID card
/// - Returns: Parsed document data
func parseBarcodeData(_ barcodeData) -> DocumentData {
    let parser = AAMVABarcodeParser()
    let documentData = try parser.parseData(barcodeData)
    if let firstName = documentData.firstName, let lastName = documentData.lastName {
        NSLog("Parsed ID card belonging to %@ %@", firstName, lastName)
    return documentData

Reference documentation

You can’t perform that action at this time.