{"id":20600967,"url":"https://github.com/spoonconsulting/cordova-plugin-genius-scan","last_synced_at":"2026-05-06T10:34:33.055Z","repository":{"id":54226240,"uuid":"115086632","full_name":"spoonconsulting/cordova-plugin-genius-scan","owner":"spoonconsulting","description":null,"archived":false,"fork":false,"pushed_at":"2021-03-03T07:53:26.000Z","size":43311,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-10-27T00:35:26.151Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/spoonconsulting.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-12-22T06:56:00.000Z","updated_at":"2021-07-01T14:13:48.000Z","dependencies_parsed_at":"2022-08-13T09:40:19.623Z","dependency_job_id":null,"html_url":"https://github.com/spoonconsulting/cordova-plugin-genius-scan","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/spoonconsulting/cordova-plugin-genius-scan","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spoonconsulting%2Fcordova-plugin-genius-scan","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spoonconsulting%2Fcordova-plugin-genius-scan/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spoonconsulting%2Fcordova-plugin-genius-scan/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spoonconsulting%2Fcordova-plugin-genius-scan/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spoonconsulting","download_url":"https://codeload.github.com/spoonconsulting/cordova-plugin-genius-scan/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spoonconsulting%2Fcordova-plugin-genius-scan/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32689207,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-06T08:33:17.875Z","status":"ssl_error","status_checked_at":"2026-05-06T08:33:17.221Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-16T09:07:41.938Z","updated_at":"2026-05-06T10:34:33.033Z","avatar_url":"https://github.com/spoonconsulting.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Genius Scan SDK Cordova plugin\n\n## Description\n\nThis Cordova plugin allows you to access the [Genius Scan SDK](https://www.thegrizzlylabs.com/document-scanner-sdk) core features from a Cordova application:\n\n  - Automatic document detection\n  - Document perspective correction\n  - Image enhancement with 4 different modes (Grayscale, Color, Black \u0026 white, Photo)\n\n\n## Licence\n\nThis plugin is based on the Genius Scan SDK for which you need to [setup a licence](#set-the-licence-key).\nYou can aleady try the \"demo\" version for free by not setting a licence key, the only limitation being that the app will exit after 60 seconds.\n\nTo buy a licence or for any question regarding the SDK, please contact us at sdk@thegrizzlylabs.com!\n\n## Demo application\n\nAs an example, you can check our [demo application](https://github.com/thegrizzlylabs/geniusscan-sdk-demo/tree/master/cordova-plugin-genius-scan-demo)\n\n## Requirements\n\nThis plugin requires `cordova-cli` above 7.0.0: see [this page](https://cordova.apache.org/docs/en/latest/guide/cli/index.html#updating-cordova-and-your-project) for upgrading if you have an older version.\n\n### Platform-specific requirements\n\n- **iOS**: `cordova-ios` above 4.3.0\n  Nothing to do on a new project; use `cordova platform update ios --save` within your existing cordova project to upgrade it.\n- **Android**: `cordova-android` at least 6.x.x\n\n**Note for Xcode 10 users**: [Cordova-ios is not fully compatible with Xcode 10 yet](https://github.com/apache/cordova-ios/issues/407), you may need to use `cordova run ios --buildFlag=\"-UseModernBuildSystem=0\"` command to build the project properly\n\n## Upgrade from an older version\n\nIf you are using an older plugin version, you will first need to remove the plugin from your cordova project:\n\n```\ncordova plugin remove @thegrizzlylabs/cordova-plugin-genius-scan\n```\n\nThen you can install the new version following the instructions below.\n\n## Installation\n\nYou can install the plugin with Cordova CLI, plugman, or using the `config.yml` file.\n\n**Note for Phonegap, Ionic and other cordova-based tools:**\n\nYou can usually run cordova commands from the `phonegap`/`ionic` cli.\n- `ionic cordova prepare`\n- `ionic cordova plugin add ....`\n- `phonegap cordova prepare` (or, shorter `phonegap prepare`)\n- ...\n\n### With Cordova CLI\n\nFrom your Cordova project folder, install the plugin with the following command:\n\n```bash\ncordova plugin add @thegrizzlylabs/cordova-plugin-genius-scan\n```\n\n### With config.yml\n\nAdd the following lines to your project's config.yml file:\n\n```xml\n\u003cplugin name=\"@thegrizzlylabs/cordova-plugin-genius-scan\" spec=\"~2.3.0\"/\u003e\n```\n\nAnd run `cordova prepare`.\n\n### With plugman\n\nFrom your Cordova project folder, you can also use **plugman** to install the plugin only for a specific platform.\n\n```bash\nplugman install --platform ios --project ./platforms/ios --plugin @thegrizzlylabs/cordova-plugin-genius-scan\n```\n\n## Usage\n\nOnce the `deviceReady` Cordova event has been fired, the following method will be available:\n\n### Set the licence key\n```javascript\ncordova.plugins.GeniusScan.setLicenceKey(licenceKey, onSuccess, onFail)\n```\n\nInitialize the SDK with a valid licence key.\nNote that, for testing purpose, you can also use the plugin without a licence key, but it will only work for 60 seconds.\n\n| Param | Type | Description |\n| --- | --- | --- |\n| licenceKey | String | Genius scan licence key for your application id |\n| onSuccess | Function | Success callback function, called when key is valid |\n| onFail | Function | [Error callback](#error-callback)|\n\n\n### Scan an existing image\n```javascript\ncordova.plugins.GeniusScan.scanImage(imageFileUri, onSuccess, onFail, scanOptions)\n```\n\n| Param | Type | Description |\n| --- | --- | --- |\n| imageFileUri | String | file URI to the original JPEG file to be transformed with the plugin (Note: it won't be overriden by the plugin) |\n| onSuccess(fileUri) | Function | Callback function, called with the file URI of the processed JPEG output |\n| onFail | Function | [Error callback](#error-callback)|\n| scanOptions | Object | [Scan Options](#scan-options) |\n\n### Scan a picture from the camera\n```javascript\ncordova.plugins.GeniusScan.scanCamera(onSuccess, onFail, scanOptions)\n```\n\n| Param | Type | Description |\n| --- | --- | --- |\n| onSuccess(fileUri) | Function | Callback function, called with the file URI of the processed JPEG output |\n| onFail | Function | [Error callback](#error-callback)|\n| scanOptions | Object | [Scan Options](#scan-options) |\n\n### Generate a pdf from images\n```javascript\ncordova.plugins.GeniusScan.generatePDF(imageFileUris, onSuccess, onFail, pdfOptions)\n```\n\n| Param | Type | Description |\n| --- | --- | --- |\n| imageFileUris | Array\u003cString\u003e | Array of URIs to JPEG files that will be converted, in the given order, into a pdf\n| onSuccess(fileUri) | Function | Callback function, called with the file URI of the resulting PDF |\n| onFail | Function | [Error callback](#error-callback)|\n| pdfOptions | Object | Options for pdf generation |\n| pdfOptions.password | String | Password to protect the pdf |\n\n### Scan options\n\n`scanOptions` can be used to customize the scanning interface:\n\n| Param | Type | Description |\n| --- | --- | --- |\n| scanOptions.defaultEnhancement | String | Force a specific image enhancement by default. Accepted values: `cordova.plugins.GeniusScan.ENHANCEMENT_NONE`, `cordova.plugins.GeniusScan.ENHANCEMENT_BW`, `cordova.plugins.GeniusScan.ENHANCEMENT_COLOR`, `cordova.plugins.GeniusScan.ENHANCEMENT_PHOTO` |\n\n### Error callback\n\nIn case of failure, error callback function is called with an error message as a string\n\n## Usage with Ionic\n\nYou can use this plugin with any Cordova-based framework, for example Ionic.\nThe way to detect that the device is ready is slightly different, but after that you also access the plugin with **cordova.plugins.GeniusScan.scanImage(imageFileUri, onSuccess, onFail)**\n\nIn the controller where you need the plugin, you will have to import `Platform` and pass it to the constructor, and also declare the `cordova` variable so that TypeScript recognizes it.\n\n```javascript\nimport { Platform } from 'ionic-angular';\n\ndeclare var cordova:any;\n\nexport class HomePage {\n  constructor(private platform: Platform) {\n    platform.ready().then(() =\u003e {\n      // platform.ready is the equivalent of the deviceReady event described above\n      // the plugin method is now available:\n      cordova.plugins.GeniusScan.scanCamera(...)\n    });\n  }\n\n}\n\n```\n\n# FAQ\n\n## What if I get a validation error from App Store Connect?\n\nYou must remove the x86_64 and i386 slices before submitting your application to the App Store. They are only used for the iOS smiulator and iTunes rejects any binary that contains non-ARM slices.\n\nThey can stripped out with a script like [this one](https://stackoverflow.com/a/42642209/1644052).\n\n## What should I do if my license is invalid?\n\nMake sure you have an ongoing contract with us. Contact us at sdk@thegrizzlylabs.com for any information.\n\n# Changelog\nAll notable changes to this project will be documented in this file.\n\nThe format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),\nand this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).\n\n## [2.4.2] - 2019-02-27\n### Changed\n- Compatibility with android-cordova \u003e= v7.0.0\n\n### Added\n- `ENHANCEMENT_NONE` default enhancement option\n- Cancel button on iOS camera screen\n- Auto trigger in Android\n\n## [2.4.1] - 2018-12-05\n### Changed\n- Fix README\n\n## [2.4.0] - 2018-12-05\n### Added\n- PDF generation with `generatePDF`\n- Selecting an enhancement type by default with `defaultEnhancement` option\n\n### Changed\n- Fix crash on ipad when clicking \"Edit\" button\n- Fix error with too long activity result code\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspoonconsulting%2Fcordova-plugin-genius-scan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspoonconsulting%2Fcordova-plugin-genius-scan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspoonconsulting%2Fcordova-plugin-genius-scan/lists"}