Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BR] Incorrect types for expectedPass on iOS #22

Open
4 tasks done
Watersdr opened this issue Mar 22, 2024 · 0 comments
Open
4 tasks done

[BR] Incorrect types for expectedPass on iOS #22

Watersdr opened this issue Mar 22, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Watersdr
Copy link

Watersdr commented Mar 22, 2024

Before Submitting, be sure to

  • Update to the latest stable version.
  • Read and follow the guides described in the documentation.
  • Try to reproduce in our demo project.
  • Search for your issue in the existing GitHub issues.

Bug Description

Incorrect types for expectedPass on iOS. The variables defined on eImageQualityCheckType that are shown in the documentation examples are typed incorrectly for the iOS library. The variables in JS are defined as numbers but iOS expects them as strings

Steps To Reproduce

Try to setup your document scan config using the exact example from the docs and your app will crash because the parameters are incorrect.

DocumentReader.setProcessParams({
    imageQA: {
        expectedPass: [
            eImageQualityCheckType.IQC_IMAGE_RESOLUTION,
            eImageQualityCheckType.IQC_IMAGE_GLARES
        ]
    }
}, (str) => { console.log(str) }, (error) => { console.log(error) });

I attempted to use the getTranslation method but that method expects a callback which is just completely unnecessary for doing a simple number to string mapping. I think the iOS native code needs to be update to accept the number type like the docs show. Or you could do the mapping on the JS side. Or even just define the string versions of the eImageQualityCheckType in JS and let the consumer do their own mappings.

@Watersdr Watersdr added the bug Something isn't working label Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

1 participant