运行 iOS 的 Nativescript OCR 插件时出现问题

Issues when running Nativescript OCR plugin for iOS

首先,对不起我的英语。我正在 运行 宁我的 Nativescript Angular 应用程序使用 nativescript OCR 1.0.0 插件。该识别适用于 Android OS 但不适用于 iOS。当我 运行 Visual Studio Code for MacOS 中的项目时,我看到了一些问题,例如:

/Users/macintosh/....../platforms/ios/Pods/TesseractOCRiOS/TesseractOCR/G8TesseractParameters.h:2353:5: warning: '@param' command used in a comment that is not attached to a function declaration [-Wdocumentation]

ld: warning: directory not found for option '-F/Users/macintosh/Library/Developer/Xcode/DerivedData/........-ewfwairpchlyrihgevrrenyiqein/Build/Intermediates.noindex/ArchiveIntermediates/visaselectronicas/BuildProductsPath/Debug-iphoneos/TesseractOCRiOS' ld: warning: directory not found for option '-F/Users/macintosh/Library/Developer/Xcode/DerivedData/...........-ewfwairpchlyrihgevrrenyiqein/Build/Intermediates.noindex/ArchiveIntermediates/......../BuildProductsPath/Debug-iphoneos/TesseractOCRiOS' error: the following command failed with exit code 0 but produced no further output Ld /Users/macintosh/Library/Developer/Xcode/DerivedData/...........-ewfwairpchlyrihgevrrenyiqein/Build/Intermediates.noindex/ArchiveIntermediates/............./IntermediateBuildFilesPath/.........../Debug-iphoneos/???.build/Objects-normal/armv7/....... normal armv7 note: Using new build systemnote: Planning buildnote: Constructing build description

Please call SetImage before attempting recognition

Recognize failed, check the log for possible details.

如何使用 iOS 的 OCR 插件并正确识别图像?

原始代码部分无效

doRecognize(args): void {
    let img: ImageSource = new ImageSource();
    img.fromAsset(args.imagenEnAsset);

    args.ocr.retrieveText({
        image: img,
        whitelist: "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789<",     
        blacklist: "/Ñ,",
        onProgress: (percentage: number) => {
            console.log(`Decoding progress: ${percentage}%`);
        }
    })

现在工作代码部分

doRecognize(args): void {
    let img: ImageSource = new ImageSource();
    img.fromAsset(args.imagenEnAsset)
        .then(
            (imageSource) => {
                if (imageSource) {
                    args.ocr.retrieveText({
                        image: imageSource,
                        whitelist: "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789<",     
                        blacklist: "/Ñ,", 
                        onProgress: (percentage: number) => {
                            console.log(`Decoding progress: ${percentage}%`);
                        }
                    })