Skip to content

Commit

Permalink
fix url for macos
Browse files Browse the repository at this point in the history
  • Loading branch information
navaronbracke committed Sep 10, 2024
1 parent f332965 commit f2902bf
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -458,14 +458,16 @@ public class MobileScannerPlugin: NSObject, FlutterPlugin, FlutterStreamHandler,
let argReader = MapArgumentReader(call.arguments as? [String: Any])
let symbologies:[VNBarcodeSymbology] = argReader.toSymbology()

guard let fileUrl: URL = URL(string: argReader.string(key: "filePath") ?? "") else {
guard let filePath: String = argReader.string(key: "filePath") else {
// TODO: fix error code
result(FlutterError(code: "MobileScanner",
message: "No image found in analyzeImage!",
details: nil))
return
}

let fileUrl = URL(fileURLWithPath: filePath)

guard let ciImage = CIImage(contentsOf: fileUrl) else {
// TODO: fix error code
result(FlutterError(code: "MobileScanner",
Expand Down

0 comments on commit f2902bf

Please sign in to comment.