Update README.md
A drivers license parser for Swift
Licensed can be installed using the Swift Package Manager. Add the following to your Package.swift file:
Package.swift
dependencies: [ .Package(url: "https://github.com/infinitetoken/Licensed.git", from: "2.0.0") ]
let barcodeString: String = "..." let license = License.parse(string: barcodeString) print(license.firstName) // => Optional("John") print(license.middleName) // => Optional("Quincy") print(license.lastName) // => Optional("Public")
License
firstName
lastName
middleName
expirationDate
issueDate
dateOfBirth
gender
eyeColor
hairColor
height
street1
street2
city
state
postalCode
customerId
documentId
issuingCountry
middleNameTruncation
firstNameTruncation
lastNameTruncation
placeOfBirth
auditInformation
inventoryControlNumber
lastNameAlias
firstNameAlias
suffixAlias
suffix
Below is a table of AAMVA Element Ids and the fields to which they map by AAMVA Version.
bold = Mandatory Field
-- = not included in this version of the standard
--
Version 8 Example License Data
@ ANSI 636026080102DL00410288ZA03290015DLDAQD12345678 DCSPUBLIC DDEN DACJOHN DCUJR DDFN DADQUINCY DDGN DCAD DCIOMAHA DCBNONE DCDNONE DBNPUCKY DBGSTICKS DBSJ DBD08242015 DBB01311970 DBA01312035 DBC1 DCJAUDIT DAU069 in DAYGRN DAG789 E OAK ST DAHAPT 1 DAIANYTOWN DAJCA DAK902230000 DCF83D9BN217QO983B1 DCGUSA DAW180 DAZBRO DCK12345678900000000000 DDB02142014 DDK1 ZAZAAN ZAB ZAC
This library was heavily influenced by the work from https://github.com/ksoftllc/license-parser.
Licensed is released under the MIT license. See LICENSE for details.
©Copyright 2023 CCF 开源发展委员会 Powered by Trustie& IntelliDE 京ICP备13000930号
Licensed
A drivers license parser for Swift
Installation
Licensed can be installed using the Swift Package Manager. Add the following to your
Package.swift
file:Usage
AAMVA Standard Supported Fields
License
AttributefirstName
lastName
middleName
expirationDate
issueDate
dateOfBirth
gender
eyeColor
hairColor
height
street1
street2
city
state
postalCode
customerId
documentId
issuingCountry
middleNameTruncation
firstNameTruncation
lastNameTruncation
placeOfBirth
auditInformation
inventoryControlNumber
lastNameAlias
firstNameAlias
suffixAlias
suffix
AAMVA Element IDs
Below is a table of AAMVA Element Ids and the fields to which they map by AAMVA Version.
bold = Mandatory Field
--
= not included in this version of the standard--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
Example Payload
Version 8 Example License Data
Attribution
This library was heavily influenced by the work from https://github.com/ksoftllc/license-parser.
License
Licensed is released under the MIT license. See LICENSE for details.