Building Production Apps | Capacitor Document Scanner
iOS
The Scanbot SDK iOS Framework (included in this Capacitor Plugin) is provided as a XCFramework.
Because Capacitor apps are normal native apps at the end of the day, the way they are deployed to the App Store is just like any other native app.
Please, consult the official Apple documentation on Submitting Apps to the App Store for more information.
Android
The Scanbot Android SDK uses native libraries under the hood and supports the following ABIs:
armeabi-v7a, arm64-v8a, x86 and x86_64
.
By default the native libraries of all these architectures will be included in the app package (APK), which will result in a big APK file.
Please consider removing support for x86
and x86_64
architectures. In most cases both "x86" architectures can be removed for the
release (production) build, since they are only used on emulators and on some rare devices with the Intel Atom architecture.
To exclude certain ABIs from the APK, use the abiFilters
property in the Android Gradle settings of your project.
Open /android/app/build.gradle
and add the following code within the buildTypes
block:
buildTypes {
release {
ndk {
abiFilters "armeabi-v7a", "arm64-v8a"
}
}
}
💡 However, if you need to support all architectures and to optimize the APK size, we highly recommend checking out the Android App Bundle approach. It allows you to create and distribute dedicated and smaller APKs via the PlayStore (basically it is similar to the iOS App Store approach).
License Check
If your Scanbot SDK license has expired, any call of the Scanbot SDK API will result in an error. To prevent this you
should always check for license expiration during the runtime by calling and checking the result of the API
method getLicenseInfo()
. If the result result.isLicenseValid
is false
, you should disable any usage of the
Scanbot SDK functions or UI components in your app.
We highly recommend implementing a suitable handling of this case in your app!
import {ScanbotSDK} from 'capacitor-plugin-scanbot-sdk';
async checkLicense() {
const result = await ScanbotSDK.getLicenseInfo();
if (result.isLicenseValid) {
// OK, we have a valid (trial) license and can now call other Scanbot SDK methods.
// E.g. launch the Document Scanner
} else {
alert('Scanbot SDK license is not valid!');
}
}
Result fields:
result.isLicenseValid: boolean
- Whether the license is valid or not.result.licenseStatus: LicenseStatus
- Status of the license asLicenseStatus
enum. See enum values and description below.result.licenseExpirationDate?: number
- Optional expiration date of the license.
LicenseStatus
enum values:
LicenseStatus.Okay
- License is valid.LicenseStatus.Trial
- No license installed, trial mode is active.LicenseStatus.Expired
- License error: License has expired.LicenseStatus.WrongOS
- License error: License does not include support for current operating system.LicenseStatus.Corrupted
- License error: License key string is invalid or corrupted. Please check the format of the string.LicenseStatus.AppIDMismatch
- License error: License does not include the Bundle ID or Application ID of this app.LicenseStatus.NotSet
- License error: No license installed (e.g. when trial mode is over).LicenseStatus.Unknown
- Unknown license status. Please contact support.
Want to scan longer than one minute?
Generate your free "no-strings-attached" Trial License and properly test the Scanbot SDK.
Get your free Trial LicenseWhat do you think of this documentation?
What can we do to improve it? Please be as detailed as you like.