Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

BarcodeFormat is not set in iOS #41

Closed
japsurd opened this issue Feb 16, 2022 · 1 comment · Fixed by #48
Closed

BarcodeFormat is not set in iOS #41

japsurd opened this issue Feb 16, 2022 · 1 comment · Fixed by #48

Comments

@japsurd
Copy link
Contributor

japsurd commented Feb 16, 2022

In iOS you will always get undefined for format since it is never set in the convertBarcode

@akriger
Copy link

akriger commented Mar 14, 2022

@japsurd

You can add the following line in VisionCameraCodeScanner.swift file to get the format on iOS

    map["cornerPoints"] = BarcodeConverter.convertToArray(points: barcode.cornerPoints as? [CGPoint])
    map["displayValue"] = barcode.displayValue
    map["rawValue"] = barcode.rawValue
    map["content"] = self.convertContent(barcode: barcode)
    map["format"] = barcode.format.rawValue // <-- Add this line
    
    return map
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants