- 04 Dec 2024
- 1 Minute to read
- DarkLight
- PDF
Integrate the Image Scanner SDK
- Updated on 04 Dec 2024
- 1 Minute to read
- DarkLight
- PDF
Android
This procedure allows you to integrate and use the Image Scanner SDK in your Android project.
To use the Image Scanner SDK in your Android project
Copy QRCodeScannerSDK.aar from the OneSpan Mobile Security Suite to the libs folder.
Declare QrScannerSDKActivity in your application manifest (refer to the Image Scanner SDK sample for details).
Add a dependency on the official ZXing wrapper to your project, using io.github.zxing-cpp:android:2.2.0.
To be able to access the camera, you need to set the appropriate permissions in your application configuration. The CAMERA and VIBRATE permissions must be added to the AndroidManifest.xml file.
For applications that target API 23 and run on Android 6.0+, the CAMERA permission must be explicitly requested at runtime. Refer to the Android sample for more details.
For applications that target an API earlier than 23 and run on Android 6.0+: If the user first grants permission upon installation and then denies the permission in the device settings, the Image Scanner SDK may not work as expected (as indicated by the Android system).
You are now ready to use the Image Scanner SDK. For more information how to integrate the functions, see Functions of the Image Scanner SDK.
iOS
This procedure allows you to integrate and use the Image Scanner SDK in your iOS project.
To use the Image Scanner SDK in your iOS project
Link MSSImageScanner.xcframework from the OneSpan Mobile Security Suite package to your Xcode project (linked framework and libraries).
Link the following libraries from the iOS SDK to your Xcode project with the Link Binary With Libraries build phase:
Libiconv
libc++ (only required if the project is compiled in Objective-C and not in Objective-C++)
XCFramework is compatible with Xcode 11 and later. We strongly recommend using XCFramework, as it facilitates the archiving of projects and it works with simulators.
Your project must be compiled with the libc++ standard library.
In iOS 10, NSCameraUsageDescription is mandatory and must be added to the .plist file of the project.
If you use Swift, your project must be linked with the -OjbC flag. This should be set in Other Linker Flags in the target's build settings. In a pbxproj project file, the raw key is OTHER_LDFLAGS.
You are now ready to use the Image Scanner SDK. For more information how to integrate the functions, see Functions of the Image Scanner SDK.