Evrotrust 反应原生 WL SDK
使用量
See the provided file
Evrotrust SDK React Native 1.4.pdf
包含 SDKs
Android WL SDK - 1.1.8
iOS WL SDK - 1.1.1232
FaceTec SDK (Android & iOS) - 10.1.9
Regula DocumentReader - iOS 9.7.6818 (MRZRFID 9.7.19696) / Android 9.7.13216 (MRZRFID 9.7.16470)
反应- 内设指令
- 设置登记册
"npm config set registry https://registry.npmjs.org/"
- 创建新工作空间
"npx [email protected]"
Where would you like to create your workspace? - org
Which stack do you want to use? - none:
Configures a TypeScript/JavaScript monorepo.
Would you like to use Prettier for code formatting? - no
Which CI provider would you like to use? - skip
Would you like remote caching to make your build faster? - skip
- 在新工作空间中输入
"cd org"
- 为 Nx 18+ 安装反应本地化
"npx nx add @nx/react-native"
- 生成反应- 内在: init
"npx nx generate @nx/react-native:app myapp"
- 生成 @nx/ react-native:应用程序
Run 'pod install' for native modules? (Y/n) › true
Which bundler do you want to use to build the application? - vite
- 在"org/myapp/package.json"中,添加了依赖性
before changes:
{
"name": "@org/myapp",
"version": "0.0.1",
"private": true,
}
after changes:
{
"name": "@org/myapp",
"version": "0.0.1",
"private": true,
"dependencies": {
"react": "19.1.1",
"react-native": "0.82.0",
"@react-native/metro-config": "^0.82.0",
"react-native-svg": "*",
"metro-config": "*"
}
}
- 在工程文件夹中输入
"cd myapp"
- 安装反应库
"npm i @evrotrust/[email protected]"
Android 设置指令
- 修改我的app/android/gradle.propertys,使其具有以下特性: 软件
- "android.enableJetifier=true"
- "android.useAndroidX=true"
- (Optional) increase memory "org.gradle.jvmargs=-Xmx4608m"
- 修改我的应用/和机器人/应用/构建.gradle,使其具有以下功能:
allprojects {
repositories {
maven {
url "https://maven.regulaforensics.com/RegulaDocumentReader"
}
google()
mavenCentral()
maven { url 'https://www.jitpack.io' }
maven {
name = "github"
url = uri("https://maven.pkg.github.com/Evrotrust/maven")
credentials {
username System.getenv("EVROTRUST_MAVEN_USERNAME")
password System.getenv("EVROTRUST_MAVEN_PASSWORD")
}
}
}
}
- 添加环境变量取决于您的操作系统 :
EVROTRUST_MAVEN_USERNAME=your_username
EVROTRUST_MAVEN_PASSWORD=your_password
- 添加到我的应用/和机器人/应用/建设中的依赖性. gradle
implementation 'com.evrotrust:evrotrust-wl-sdk:1.1.8'
implementation 'com.evrotrust:facetec-sdk:10.1.9'
- (备选) 如果您收到未出错
"Unable to make progress running work. There are items queued for
execution but none of them can be started"
Add this to myapp/android/build.gradle
gradle.startParameter.excludedTaskNames.addAll(
gradle.startParameter.taskNames.findAll { it.contains("testClasses") }
)
- (备选) 如果你在换地后收到崩溃, 将此添加到我的app/android/app/src/main/AndroidManifest.xml中
android:configChanges="locale|layoutDirection"
- 运行工程
"npx nx run-android myapp"
iOS 设置指令
- 在项目某处添加"regula.license"文件. 从"构建相"中的 Xcode > Copy Bundle Resources"添加"regula.license"文件.
- 选择目标 - > 构建设置 - > 总是嵌入 Swift 标准库 - > set 是
- 选择目标 - > 构建设置 - > 总是启用比特码 - > set NO
- 打开工程 名称/ios/ project name likes/Info.plist
Add in .plist file:
- key NSCameraUsageDescription with some description
- key NSMicrophoneUsageDescription with some description
- key NFCReaderUsageDescription with some description
- key com.apple.developer.nfc.readersession.iso7816.select-identifiers - an array with
the following string elements:
* A00000045645444C2D3031
* A0000002480300
* A0000002480200
* A0000002480100
* A000000167455349474E
* E80704007F00070302
* A0000002471001
- key UIDesignRequiresCompatibility with Boolean YES (required to use the
pre-iOS 26 design, since the SDK doesn't support the new design introduced
in iOS 26)
-
AFNetworking (4. 0.1) 与 SDK 作为预建动态捆绑 x框架和自动嵌入
pod install- 无需采取行动. (英语:EvrotrustSDK. 框架通过@rpath/AFNetworking.framework,所以这个 必须是一个动态框架; 添加它作为源代码会打破 带有重复/静态链接错误的构建。 ) -
在 XCode 中添加 FaceTec.strings 作为本地化文件,用于英语(EN)、保加利亚语(BG)、德语(DE)、匈牙利语(HU)、阿尔巴尼亚语(SQ)、马其顿语(MK)、罗马尼亚语(RO)、意大利语(IT)和法语(FR)
-
运行工程
"npx nx run-ios myapp"