Closed yoncise closed 1 year ago
When running the plugin on macOS 12, I find no texts can be recognized.
Running the Swift script directly, I can see these errors:
R.swift:89:20: error: 'init(filePath:directoryHint:relativeTo:)' is only available in macOS 13.0 or newer AlfredOCR.snap = URL(filePath: PATH) ^ /Alfred/Alfred.alfredpreferences/workflows/user.workflow.2AAA757D-05F1-4D04-8A46-C1A9B8BA5B28/AlfredOCR.swift:89:20: note: add 'if #available' version check AlfredOCR.snap = URL(filePath: PATH) ^ /Alfred/Alfred.alfredpreferences/workflows/user.workflow.2AAA757D-05F1-4D04-8A46-C1A9B8BA5B28/AlfredOCR.swift:84:7: note: add @available attribute to enclosing instance method func validate() -> Never? { ^ /Alfred/Alfred.alfredpreferences/workflows/user.workflow.2AAA757D-05F1-4D04-8A46-C1A9B8BA5B28/AlfredOCR.swift:82:1: note: add @available attribute to enclosing extension extension FileManager { ^
I need to change AlfredOCR.snap = URL(filePath: PATH) to AlfredOCR.snap = URL(fileURLWithPath: PATH) to let the plugin run successfully.
AlfredOCR.snap = URL(filePath: PATH)
AlfredOCR.snap = URL(fileURLWithPath: PATH)
Thanks, taken into account for v1.1.1 (code)
When running the plugin on macOS 12, I find no texts can be recognized.
Running the Swift script directly, I can see these errors:
I need to change
AlfredOCR.snap = URL(filePath: PATH)
toAlfredOCR.snap = URL(fileURLWithPath: PATH)
to let the plugin run successfully.