在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):Jumio/mobile-react开源软件地址(OpenSource Url):https://github.com/Jumio/mobile-react开源编程语言(OpenSource Language):Swift 48.4%开源软件介绍(OpenSource Introduction):Plugin for React NativeOfficial Jumio Mobile SDK plugin for React Native This plugin is compatible with version 4.2.0 of the Jumio SDK. If you have questions, please reach out to your Account Manager or contact Jumio Support. Table of ContentsCompatibilityWe only ensure compatibility with a minimum React Native version of 0.68.2 SetupCreate React Native project and add the Jumio Mobile SDK module to it. react-native init MyProject
cd MyProject
npm install --save https://github.com/Jumio/mobile-react.git#v4.2.0 IntegrationiOS
AndroidAndroidManifest <application
...
android:allowBackup="false">
</application>
...
<uses-permission android:name="android.permission.HIGH_SAMPLING_RATE_SENSORS"/> Make sure your compileSdkVersion and buildToolsVersion are high enough. android {
compileSdkVersion 31
buildToolsVersion "32.0.0"
...
} Enable MultiDex android {
...
defaultConfig {
...
multiDexEnabled true
}
} Upgrade Gradle build tools Upgrade build tools version to 7.2.0 in android/build.gradle: buildscript {
...
dependencies {
...
classpath 'com.android.tools.build:gradle:7.2.0'
}
} Modify the Gradle Wrapper version in android/gradle.properties. Repository exclusiveContent {
forRepository {
maven {
url 'https://repo.mobile.jumio.ai'
}
}
filter {
includeGroup "com.jumio.android"
includeGroup "com.iproov.sdk"
}
} Proguard Rules Usage
import {
...
NativeModules
} from 'react-native';
const { JumioMobileSDK } = NativeModules;
JumioMobileSDK.initialize(<AUTHORIZATION_TOKEN>, <DATACENTER>); Datacenter can either be US, EU or SG. As soon as the SDK is initialized, the SDK is started by the following call. JumioMobileSDK.start(); Optionally, it is possible to check whether a device is rooted / jailbroken with the following method: const isRooted = await JumioMobileSDK.isRooted(); Retrieving informationYou can listen to events to retrieve the scanned data:
First add import {
...
NativeEventEmitter
} from 'react-native'; The event receives a JSON object with all the data. The example below shows how to retrieve the information of each emitter as a String: const emitterJumio = new NativeEventEmitter(JumioMobileSDK);
emitterJumio.addListener(
'EventResult',
(EventResult) => console.warn("EventResult: " + JSON.stringify(EventResult))
);
emitterJumio.addListener(
'EventError',
(EventError) => console.warn("EventError: " + JSON.stringify(EventError))
); CustomizationAndroidJumioSDK Android appearance can be customized by overriding the custom theme iOSJumioSDK iOS appearance can be customized to your respective needs. You can customize each color based on the device's set appearance, for either Dark mode or Light mode, or you can set a single color for both appearances. Customization is optional and not required. You can pass the following customization options to the
All colors are provided with a HEX string in the following formats: Customization example Example for setting color based on Dark or Light mode:
Example for setting same color for both Dark and Light mode:
CallbacksIn oder to get information about result fields, Retrieval API, Delete API, global settings and more, please read our page with server related information. Result ObjectsThe JSON object with all the extracted data that is returned for the specific products is described in the following subchapters: EventResult
MRZ-Data
FAQiOS Runs on Debug, Crashes on Release BuildThis happens due to Xcode 13 introducing a new option to their App Store Distribution Options: "Manage Version and Build Number" (see image below) If checked, this option changes the version and build number of all content of your app to the overall application version, including third-party frameworks. This option is enabled by default. Please make sure to disable this option when archiving / exporting your application to the App Store. Otherwise, the Jumio SDK version check, which ensures all bundled frameworks are up to date, will fail. Alternatively, it is also possible to set the key
Using Dynamic Frameworks with React Native Sample AppJumio SDK version 3.8.0 and newer use iProov dependencies that need need to be built as dynamic frameworks.
Since React Native supports only static libraries, a pre-install hook has been added to ensure that pods added as
Additionally, a post install hook needs to be added to the Podfile to ensure dependencies are build for distribution:
Please refer to the iOS section of our DemoApp guide for additional details. iOS LocalizationAfter installing Cocoapods, please localize your iOS application using the languages provided at the following path: iProov String KeysPlease note that as of 3.8.0. the following keys have been added to the SDK:
Make sure your SupportContactIf you have any questions regarding our implementation guide please contact Jumio Customer Service at [email protected] or https://support.jumio.com. The Jumio online helpdesk contains a wealth of information regarding our service including demo videos, product descriptions, FAQs and other things that may help to get you started with Jumio. Check it out at: https://support.jumio.com. LicensesThe software contains third-party open source software. For more information, please see Android licenses and iOS licenses This software is based in part on the work of the Independent JPEG Group. Copyright© Jumio Corp. 268 Lambert Avenue, Palo Alto, CA 94306 The source code and software available on this website (“Software”) is provided by Jumio Corp. or its affiliated group companies (“Jumio”) "as is” and any express or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall Jumio be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including but not limited to procurement of substitute goods or services, loss of use, data, profits, or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this Software, even if advised of the possibility of such damage. In any case, your use of this Software is subject to the terms and conditions that apply to your contractual relationship with Jumio. As regards Jumio’s privacy practices, please see our privacy notice available here: Privacy Policy. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论