Codabar Barcode Scanning

Originator:rquick
Number:rdar://19282514 Date Originated:17-Dec-2014
Status:Open Resolved:
Product:iOS SDK Product Version:6.1.1
Classification: Reproducible:
 
Summary:
It would be beneficial to be able to scan codabar barcodes.

It would be nice to have the following:
- codabar available in the AVCaptureMetadataOutput availableMetadataObjectTypes
- codabar as a metadataObjectType that can be added to the AVCaptureMetadataOutput metatdataObjectTypes
- Have AVCaptureMetadataOutputObjectsDelegate’s captureOutput delegate function’s metadataObjects include codabar metadata
- Have codabar as a NSString const* AVMetadataObjectType for comparison against an AVMetadataObject type
- Have an AVMetadataMachineReadableCodeObject for codabar barcode types
- Be able to transform codabar metadata objects with AVMetadataMachineReadableCodeObject so we can acquire the barcode string

Steps to Reproduce:
1. self.session = [[AVCaptureSession alloc] init];
2. self.device = [AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeVideo];
3. NSError* our_error;
self.input = [AVCaptureDeviceInput deviceInputWithDevice:self.device error:&our_error];
[self.session addInput:self.input];
4. self.output = [[AVCaptureMetadataOutput alloc] init];
[self.output setMetadataObjectsDelegate:self queue:dispatch_get_main_queue()];
[self.session addOutput:self.output];
self.output.metadataObjectTypes = [self.output availableMetadataObjectTypes]; ****Would like codabar available here****
5. Blah blah preview
6. - (void)captureOutput:(AVCaptureOutput *)captureOutput didOutputMetadataObjects:(NSArray *)metadataObjects fromConnection:(AVCaptureConnection *)connection { ****Would like codabar returned in metadataObjects
7. NSArray* barcodeTypes = @[AVMetadataObjectTypeUPCECode, AVMetadataObjectTypeCode39Code, etc, etc]; ****Would like codabar as an option, like AVMetadataObjectTypeCodabarCode or similar****
8. for (AVMetadataObject* metadata in metadataObjects) {
  for (NSString* type in barcodeTypes) {
    if ([metadata.type isEqualToString:type]) {
      barcodeObject = (AVMetadataMachineReadableCodeObject *) [self.preview_layer transformedMetadataObjectForMetadataObject:(AVMetadataMachineReadableCodeObject*)metadata];
      detectionString = [(AVMetadataMachineReadableCodeObject*) metadata stringValue]; ****Would like to get the codabar barcode result here****
      break;
    }
  }
}

Expected Results:
Codabar as a barcode type and scanning to acquire the barcode value from the image.

Actual Results:
Codabar is not available as a barcode type. Attempts to scan a codabar barcode are unsuccessful.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!