Skip to content

Commit

Permalink
#106 Please add DataMatrix to iOS
Browse files Browse the repository at this point in the history
  • Loading branch information
EddyVerbruggen committed Aug 8, 2017
1 parent 5b5cd73 commit 2d81df9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,21 @@
## Supported barcode types

### iOS and Android
* AZTEC (on Android only when passed in explicity via `formats`)
* CODE_39
* CODE_93
* CODE_128
* DATA_MATRIX
* EAN_8
* EAN_13
* ITF (also known as ITF14)
* PDF_417 (on Android only when passed in explicity via `formats`)
* QR_CODE
* UPC_E
* AZTEC (on Android only when passed in explicity via `formats`)
* PDF_417 (on Android only when passed in explicity via `formats`)

### Android only
* DATA_MATRIX
* CODABAR
* MAXICODE
* ITF
* RSS_14
* UPC_A

Expand Down
3 changes: 3 additions & 0 deletions barcodescanner.ios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,12 +188,15 @@ export class BarcodeScanner {
else if (format === "CODE_39_MOD_43") types.push(AVMetadataObjectTypeCode39Mod43Code);
else if (format === "CODE_93") types.push(AVMetadataObjectTypeCode93Code);
else if (format === "CODE_128") types.push(AVMetadataObjectTypeCode128Code);
else if (format === "DATA_MATRIX") types.push(AVMetadataObjectTypeDataMatrixCode);
else if (format === "EAN_8") types.push(AVMetadataObjectTypeEAN8Code);
else if (format === "EAN_13") types.push(AVMetadataObjectTypeEAN13Code);
else if (format === "ITF") types.push(AVMetadataObjectTypeITF14Code);
}
} else {
types = [AVMetadataObjectTypeUPCECode, AVMetadataObjectTypeCode39Code, AVMetadataObjectTypeCode39Mod43Code,
AVMetadataObjectTypeEAN13Code, AVMetadataObjectTypeEAN8Code, AVMetadataObjectTypeCode93Code, AVMetadataObjectTypeCode128Code,
AVMetadataObjectTypeDataMatrixCode, AVMetadataObjectTypeITF14Code,
AVMetadataObjectTypePDF417Code, AVMetadataObjectTypeQRCode, AVMetadataObjectTypeAztecCode];
}

Expand Down

0 comments on commit 2d81df9

Please sign in to comment.