@regulaforensics/idv 3.10.225-rc → 3.10.230-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Package.swift +27 -0
- package/README.md +3 -0
- package/android/CDVIDV.kt +5 -3
- package/android/build.gradle.kts +41 -0
- package/android/cordova.gradle.kts +20 -0
- package/android/src/main/{java → kotlin}/com/regula/plugin/idv/RNIDVModule.kt +3 -2
- package/app.plugin.js +10 -7
- package/examples/capacitor/README.md +2 -0
- package/examples/capacitor/android/app/build.gradle +2 -10
- package/examples/capacitor/android/build.gradle +12 -3
- package/examples/capacitor/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/examples/capacitor/android/gradle/wrapper/gradle-wrapper.properties +1 -1
- package/examples/capacitor/android/gradle.properties +4 -0
- package/examples/capacitor/android/gradlew +4 -7
- package/examples/capacitor/android/gradlew.bat +82 -94
- package/examples/capacitor/android/variables.gradle +13 -9
- package/examples/capacitor/capacitor.config.json +15 -0
- package/examples/capacitor/index.tsx +2 -7
- package/examples/capacitor/ios/App/App/AppDelegate.swift +5 -40
- package/examples/capacitor/ios/App/App/Info.plist +18 -2
- package/examples/capacitor/ios/App/App/SceneDelegate.swift +23 -0
- package/examples/capacitor/ios/App/App.xcodeproj/project.pbxproj +25 -69
- package/examples/capacitor/ios/App/CapApp-SPM/Sources/CapApp-SPM/CapApp-SPM.swift +1 -0
- package/examples/capacitor/package.json +16 -18
- package/examples/capacitor/scripts/android.sh +5 -8
- package/examples/capacitor/scripts/ios.sh +5 -7
- package/examples/capacitor/scripts/setup.sh +2 -7
- package/examples/capacitor/src/main.css +5 -1
- package/examples/capacitor/src/main.tsx +1 -1
- package/examples/capacitor/vite.config.ts +0 -12
- package/examples/ionic/README.md +2 -0
- package/examples/ionic/config.xml +1 -1
- package/examples/ionic/index.tsx +8 -3
- package/examples/ionic/package.json +23 -27
- package/examples/ionic/scripts/android.sh +1 -3
- package/examples/ionic/scripts/ios.sh +0 -2
- package/examples/ionic/scripts/setup.sh +0 -2
- package/examples/ionic/src/main.tsx +1 -1
- package/examples/ionic/tsconfig.json +0 -1
- package/examples/react_native/README.md +2 -0
- package/examples/react_native/package.json +19 -19
- package/examples/react_native/scripts/android.sh +6 -6
- package/examples/react_native/scripts/ios.sh +5 -5
- package/examples/react_native/scripts/setup.sh +3 -3
- package/examples/react_native/src/main.tsx +1 -1
- package/ios/CDVIDV.swift +23 -6
- package/ios/{Main.swift → Implementation.swift} +4 -4
- package/ios/RNIDV.swift +9 -3
- package/ios/Utils.swift +2 -0
- package/package.json +1 -1
- package/plugin.xml +10 -10
- package/react-native-idv.podspec +14 -0
- package/test/package-lock.json +1 -1
- package/test/test.tsx +26 -2
- package/www/capacitor/index.js +21 -3
- package/www/capacitor/internal/bridge.js +2 -1
- package/www/capacitor/internal/cordova.js +2 -2
- package/www/cordova.js +4 -4
- package/www/react-native/index.js +21 -3
- package/www/react-native/internal/bridge.js +2 -1
- package/www/types/index.d.ts +13 -2
- package/RNIDV.podspec +0 -21
- package/android/build.gradle +0 -32
- package/android/cordova.gradle +0 -20
- package/examples/capacitor/android/app/capacitor.build.gradle +0 -19
- package/examples/capacitor/android/capacitor.settings.gradle +0 -9
- package/examples/capacitor/ionic.config.json +0 -7
- package/examples/capacitor/ios/App/App/Base.lproj/Main.storyboard +0 -19
- package/examples/capacitor/ios/App/App.xcworkspace/contents.xcworkspacedata +0 -10
- package/examples/capacitor/ios/App/App.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
- package/examples/capacitor/ios/App/Podfile +0 -29
- package/examples/capacitor/ios/App/Podfile.lock +0 -52
- package/examples/capacitor/package-lock.json +0 -3063
- package/examples/ionic/package-lock.json +0 -16573
- package/examples/react_native/package-lock.json +0 -6444
- /package/android/src/main/{java/com/regula/plugin/idv/Main.kt → kotlin/com/regula/plugin/idv/Implementation.kt} +0 -0
- /package/android/src/main/{java → kotlin}/com/regula/plugin/idv/JSONConstructor.kt +0 -0
- /package/android/src/main/{java → kotlin}/com/regula/plugin/idv/Utils.kt +0 -0
package/Package.swift
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// swift-tools-version: 5.9
|
|
2
|
+
|
|
3
|
+
import PackageDescription
|
|
4
|
+
|
|
5
|
+
let package = Package(
|
|
6
|
+
name: "@regulaforensics/idv",
|
|
7
|
+
platforms: [.iOS(.v15)],
|
|
8
|
+
products: [.library(name: "@regulaforensics/idv", targets: ["@regulaforensics/idv"])],
|
|
9
|
+
dependencies: [
|
|
10
|
+
.package(url: "https://github.com/apache/cordova-ios.git", branch: "master"),
|
|
11
|
+
.package(
|
|
12
|
+
url: "https://github.com/regulaforensics/IDVSDK-Swift-Package",
|
|
13
|
+
exact: "3.9.1987"
|
|
14
|
+
)
|
|
15
|
+
],
|
|
16
|
+
targets: [
|
|
17
|
+
.target(
|
|
18
|
+
name: "@regulaforensics/idv",
|
|
19
|
+
dependencies: [
|
|
20
|
+
.product(name: "Cordova", package: "cordova-ios"),
|
|
21
|
+
.product(name: "IDVSDK", package: "IDVSDK-Swift-Package")
|
|
22
|
+
],
|
|
23
|
+
path: "ios",
|
|
24
|
+
exclude: ["RNIDV.swift", "RNIDV.m"]
|
|
25
|
+
)
|
|
26
|
+
]
|
|
27
|
+
)
|
package/README.md
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
# Regula IDV plugin
|
|
2
|
+
|
|
2
3
|
IDV is a framework that unifies access to all Regula products. This plugin makes possible to use it with react-native, cordova and capacitor applications.
|
|
3
4
|
|
|
5
|
+
Requires iOS 15+ & Android 7.0+ (API 24)
|
|
6
|
+
|
|
4
7
|
## Android Integration
|
|
5
8
|
|
|
6
9
|
This step is only needed for ***React Native***
|
package/android/CDVIDV.kt
CHANGED
|
@@ -21,9 +21,10 @@ fun sendEvent(callbackId: String, data: Any? = "") {
|
|
|
21
21
|
val pluginResult = when (data) {
|
|
22
22
|
is Int -> PluginResult(PluginResult.Status.OK, data)
|
|
23
23
|
is Boolean -> PluginResult(PluginResult.Status.OK, data)
|
|
24
|
+
is Throwable -> PluginResult(PluginResult.Status.ERROR, data.message)
|
|
24
25
|
else -> PluginResult(PluginResult.Status.OK, data.toSendable() as String?)
|
|
25
26
|
}
|
|
26
|
-
pluginResult.keepCallback =
|
|
27
|
+
pluginResult.keepCallback = data !is Throwable
|
|
27
28
|
binding.webView.sendPluginResult(pluginResult, eventCallbackIds[callbackId] ?: callbackId)
|
|
28
29
|
}
|
|
29
30
|
|
|
@@ -43,8 +44,9 @@ class CDVIDV : CordovaPlugin() {
|
|
|
43
44
|
if (method == "setEvent") eventCallbackIds[args(0)] = callbackContext.callbackId
|
|
44
45
|
try {
|
|
45
46
|
methodCall(method) { data: Any? -> sendEvent(callbackContext.callbackId, data) }
|
|
46
|
-
} catch (error:
|
|
47
|
-
Log.e("REGULA", "Caught exception in \"$method\" function:", error)
|
|
47
|
+
} catch (error: Throwable) {
|
|
48
|
+
Log.e("REGULA", "Caught an exception in \"$method\" function:", error)
|
|
49
|
+
sendEvent(callbackContext.callbackId, Throwable("Unexpected error, check logs for details"))
|
|
48
50
|
}
|
|
49
51
|
return true
|
|
50
52
|
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import com.android.build.api.dsl.LibraryExtension
|
|
2
|
+
|
|
3
|
+
plugins {
|
|
4
|
+
id("com.android.library")
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
// AGP 9+ may already provide built-in Kotlin.
|
|
8
|
+
if (extensions.findByName("kotlin") == null) {
|
|
9
|
+
apply(plugin = "kotlin-android")
|
|
10
|
+
apply(plugin = "kotlin-kapt")
|
|
11
|
+
} else {
|
|
12
|
+
apply(plugin = "com.android.legacy-kapt")
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
extensions.configure<LibraryExtension> {
|
|
16
|
+
namespace = "com.regula.plugin.idv"
|
|
17
|
+
compileSdk = 36
|
|
18
|
+
buildFeatures { dataBinding = true }
|
|
19
|
+
|
|
20
|
+
defaultConfig {
|
|
21
|
+
minSdk = 24
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
rootProject.allprojects {
|
|
26
|
+
repositories {
|
|
27
|
+
maven { url = uri("https://maven.regulaforensics.com/RegulaDocumentReader") }
|
|
28
|
+
maven { url = uri("https://maven.regulaforensics.com/RegulaDocumentReader/Beta") }
|
|
29
|
+
maven { url = uri("https://maven.regulaforensics.com/RegulaDocumentReader/Nightly") }
|
|
30
|
+
maven { url = uri("https://maven.regulaforensics.com/RegulaDocumentReader/Stage") }
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
dependencies {
|
|
35
|
+
//noinspection GradleDynamicVersion
|
|
36
|
+
implementation("com.facebook.react:react-native:+")
|
|
37
|
+
//noinspection GradleDependency
|
|
38
|
+
implementation("com.regula.idv:api:3.9.359") {
|
|
39
|
+
isTransitive = true
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
apply(plugin = "kotlin-android")
|
|
2
|
+
apply(plugin = "kotlin-kapt")
|
|
3
|
+
|
|
4
|
+
extensions.getByName("android").withGroovyBuilder {
|
|
5
|
+
"buildFeatures" { setProperty("dataBinding", true) }
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
repositories {
|
|
9
|
+
maven { url = uri("https://maven.regulaforensics.com/RegulaDocumentReader") }
|
|
10
|
+
maven { url = uri("https://maven.regulaforensics.com/RegulaDocumentReader/Beta") }
|
|
11
|
+
maven { url = uri("https://maven.regulaforensics.com/RegulaDocumentReader/Nightly") }
|
|
12
|
+
maven { url = uri("https://maven.regulaforensics.com/RegulaDocumentReader/Stage") }
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
dependencies {
|
|
16
|
+
//noinspection GradleDependency
|
|
17
|
+
add("implementation", "com.regula.idv:api:3.9.359") {
|
|
18
|
+
isTransitive = true
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -65,8 +65,9 @@ class RNIDVModule(reactContext: ReactApplicationContext) : ReactContextBaseJavaM
|
|
|
65
65
|
args = JSONArray(arguments.toArrayList())
|
|
66
66
|
try {
|
|
67
67
|
methodCall(method) { data -> promise.resolve(data.toSendable()) }
|
|
68
|
-
} catch (error:
|
|
69
|
-
Log.e("REGULA", "Caught exception in \"$method\" function:", error)
|
|
68
|
+
} catch (error: Throwable) {
|
|
69
|
+
Log.e("REGULA", "Caught an exception in \"$method\" function:", error)
|
|
70
|
+
promise.reject(Throwable("Unexpected error, check logs for details"))
|
|
70
71
|
}
|
|
71
72
|
}
|
|
72
73
|
|
package/app.plugin.js
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
const {
|
|
1
|
+
module.exports = function withRegulaPodSources(config) {
|
|
2
|
+
const { createRequire } = require('module');
|
|
3
|
+
const { join } = require('path');
|
|
4
|
+
const projectRoot = config._internal?.projectRoot ?? process.cwd();
|
|
5
|
+
const appRequire = createRequire(join(projectRoot, 'package.json'));
|
|
6
|
+
const { withPodfile } = appRequire('expo/config-plugins');
|
|
3
7
|
|
|
4
|
-
const SOURCES = [
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
];
|
|
8
|
+
const SOURCES = [
|
|
9
|
+
'https://github.com/CocoaPods/Specs.git',
|
|
10
|
+
'https://github.com/regulaforensics/podspecs.git',
|
|
11
|
+
];
|
|
8
12
|
|
|
9
|
-
module.exports = function withRegulaPodSources(config) {
|
|
10
13
|
return withPodfile(config, (config) => {
|
|
11
14
|
let podfile = config.modResults.contents;
|
|
12
15
|
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Regula IDV Capacitor demo application
|
|
2
2
|
|
|
3
|
+
Requires Node.js 22+, Xcode 26+, Android Studio with JDK 21+ and Android SDK 37.
|
|
4
|
+
|
|
3
5
|
## How to build demo application
|
|
4
6
|
1. Download or the clone current repository using the command `git clone https://github.com/regulaforensics/npm-idv.git`.
|
|
5
7
|
2. Put `regula.license` file at `public/assets/` (you can get a trial license [here](https://client.regulaforensics.com)).
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
apply plugin: 'com.android.application'
|
|
2
2
|
|
|
3
3
|
android {
|
|
4
|
+
buildFeatures { dataBinding true }
|
|
4
5
|
namespace = "com.regula.example.idv.capacitor"
|
|
5
6
|
compileSdkVersion rootProject.ext.compileSdkVersion
|
|
6
7
|
defaultConfig {
|
|
@@ -18,7 +19,7 @@ android {
|
|
|
18
19
|
buildTypes {
|
|
19
20
|
release {
|
|
20
21
|
minifyEnabled false
|
|
21
|
-
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
22
|
+
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
22
23
|
}
|
|
23
24
|
}
|
|
24
25
|
}
|
|
@@ -39,12 +40,3 @@ dependencies {
|
|
|
39
40
|
}
|
|
40
41
|
|
|
41
42
|
apply from: 'capacitor.build.gradle'
|
|
42
|
-
|
|
43
|
-
try {
|
|
44
|
-
def servicesJSON = file('google-services.json')
|
|
45
|
-
if (servicesJSON.text) {
|
|
46
|
-
apply plugin: 'com.google.gms.google-services'
|
|
47
|
-
}
|
|
48
|
-
} catch(Exception e) {
|
|
49
|
-
logger.info("google-services.json not found, google-services plugin not applied. Push Notifications won't work")
|
|
50
|
-
}
|
|
@@ -7,9 +7,8 @@ buildscript {
|
|
|
7
7
|
mavenCentral()
|
|
8
8
|
}
|
|
9
9
|
dependencies {
|
|
10
|
-
classpath 'com.android.tools.build:gradle:
|
|
11
|
-
classpath
|
|
12
|
-
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:2.2.20"
|
|
10
|
+
classpath 'com.android.tools.build:gradle:9.4.0'
|
|
11
|
+
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:2.4.20"
|
|
13
12
|
|
|
14
13
|
// NOTE: Do not place your application dependencies here; they belong
|
|
15
14
|
// in the individual module build.gradle files
|
|
@@ -28,3 +27,13 @@ allprojects {
|
|
|
28
27
|
task clean(type: Delete) {
|
|
29
28
|
delete rootProject.buildDir
|
|
30
29
|
}
|
|
30
|
+
|
|
31
|
+
// Use the JDK running Gradle, while keeping Capacitor's Java 21 bytecode target.
|
|
32
|
+
subprojects {
|
|
33
|
+
afterEvaluate {
|
|
34
|
+
if (plugins.hasPlugin('org.jetbrains.kotlin.android')) {
|
|
35
|
+
kotlin.jvmToolchain(JavaVersion.current().majorVersion.toInteger())
|
|
36
|
+
kotlin.compilerOptions.jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_21)
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
distributionBase=GRADLE_USER_HOME
|
|
2
2
|
distributionPath=wrapper/dists
|
|
3
|
-
distributionUrl=https\://services.gradle.org/distributions/gradle-
|
|
3
|
+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.7.1-bin.zip
|
|
4
4
|
networkTimeout=10000
|
|
5
5
|
validateDistributionUrl=true
|
|
6
6
|
zipStoreBase=GRADLE_USER_HOME
|
|
@@ -20,3 +20,7 @@ org.gradle.jvmargs=-Xmx1536m
|
|
|
20
20
|
# Android operating system, and which are packaged with your app's APK
|
|
21
21
|
# https://developer.android.com/topic/libraries/support-library/androidx-rn
|
|
22
22
|
android.useAndroidX=true
|
|
23
|
+
|
|
24
|
+
# Required by Capacitor and its generated Cordova plugin module on AGP 9.
|
|
25
|
+
android.newDsl=false
|
|
26
|
+
android.builtInKotlin=false
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/bin/sh
|
|
2
2
|
|
|
3
3
|
#
|
|
4
|
-
# Copyright © 2015
|
|
4
|
+
# Copyright © 2015 the original authors.
|
|
5
5
|
#
|
|
6
6
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
7
|
# you may not use this file except in compliance with the License.
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
|
|
21
21
|
##############################################################################
|
|
22
22
|
#
|
|
23
|
-
#
|
|
23
|
+
# gradlew start up script for POSIX generated by Gradle.
|
|
24
24
|
#
|
|
25
25
|
# Important for running:
|
|
26
26
|
#
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
# bash, then to run this script, type that shell name before the whole
|
|
30
30
|
# command line, like:
|
|
31
31
|
#
|
|
32
|
-
# ksh
|
|
32
|
+
# ksh gradlew
|
|
33
33
|
#
|
|
34
34
|
# Busybox and similar reduced shells will NOT work, because this script
|
|
35
35
|
# requires all of these POSIX shell features:
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
# Darwin, MinGW, and NonStop.
|
|
58
58
|
#
|
|
59
59
|
# (3) This script is generated from the Groovy template
|
|
60
|
-
# https://github.com/gradle/gradle/blob/
|
|
60
|
+
# https://github.com/gradle/gradle/blob/3d91ce3b8caaf77ad09f381f43615b715b53f72c/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
|
61
61
|
# within the Gradle project.
|
|
62
62
|
#
|
|
63
63
|
# You can find Gradle at https://github.com/gradle/gradle/.
|
|
@@ -114,7 +114,6 @@ case "$( uname )" in #(
|
|
|
114
114
|
NONSTOP* ) nonstop=true ;;
|
|
115
115
|
esac
|
|
116
116
|
|
|
117
|
-
CLASSPATH="\\\"\\\""
|
|
118
117
|
|
|
119
118
|
|
|
120
119
|
# Determine the Java command to use to start the JVM.
|
|
@@ -172,7 +171,6 @@ fi
|
|
|
172
171
|
# For Cygwin or MSYS, switch paths to Windows format before running java
|
|
173
172
|
if "$cygwin" || "$msys" ; then
|
|
174
173
|
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
|
175
|
-
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
|
176
174
|
|
|
177
175
|
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
|
178
176
|
|
|
@@ -212,7 +210,6 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
|
|
212
210
|
|
|
213
211
|
set -- \
|
|
214
212
|
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
|
215
|
-
-classpath "$CLASSPATH" \
|
|
216
213
|
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
|
|
217
214
|
"$@"
|
|
218
215
|
|
|
@@ -1,94 +1,82 @@
|
|
|
1
|
-
@rem
|
|
2
|
-
@rem Copyright 2015 the original author or authors.
|
|
3
|
-
@rem
|
|
4
|
-
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
@rem you may not use this file except in compliance with the License.
|
|
6
|
-
@rem You may obtain a copy of the License at
|
|
7
|
-
@rem
|
|
8
|
-
@rem https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
@rem
|
|
10
|
-
@rem Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
@rem See the License for the specific language governing permissions and
|
|
14
|
-
@rem limitations under the License.
|
|
15
|
-
@rem
|
|
16
|
-
@rem SPDX-License-Identifier: Apache-2.0
|
|
17
|
-
@rem
|
|
18
|
-
|
|
19
|
-
@if "%DEBUG%"=="" @echo off
|
|
20
|
-
@rem ##########################################################################
|
|
21
|
-
@rem
|
|
22
|
-
@rem
|
|
23
|
-
@rem
|
|
24
|
-
@rem ##########################################################################
|
|
25
|
-
|
|
26
|
-
@rem Set local scope for the variables
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
set DIRNAME=%~dp0
|
|
30
|
-
if "%DIRNAME%"=="" set DIRNAME=.
|
|
31
|
-
@rem This is normally unused
|
|
32
|
-
set APP_BASE_NAME=%~n0
|
|
33
|
-
set APP_HOME=%DIRNAME%
|
|
34
|
-
|
|
35
|
-
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
|
36
|
-
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
|
37
|
-
|
|
38
|
-
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
|
39
|
-
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
|
40
|
-
|
|
41
|
-
@rem Find java.exe
|
|
42
|
-
if defined JAVA_HOME goto findJavaFromJavaHome
|
|
43
|
-
|
|
44
|
-
set JAVA_EXE=java.exe
|
|
45
|
-
%JAVA_EXE% -version >NUL 2>&1
|
|
46
|
-
if %ERRORLEVEL% equ 0 goto execute
|
|
47
|
-
|
|
48
|
-
echo. 1>&2
|
|
49
|
-
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
|
|
50
|
-
echo. 1>&2
|
|
51
|
-
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
|
52
|
-
echo location of your Java installation. 1>&2
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
:findJavaFromJavaHome
|
|
57
|
-
set JAVA_HOME=%JAVA_HOME:"=%
|
|
58
|
-
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
|
59
|
-
|
|
60
|
-
if exist "%JAVA_EXE%" goto execute
|
|
61
|
-
|
|
62
|
-
echo. 1>&2
|
|
63
|
-
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
|
|
64
|
-
echo. 1>&2
|
|
65
|
-
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
|
66
|
-
echo location of your Java installation. 1>&2
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
:execute
|
|
71
|
-
@rem Setup the command line
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
@rem
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
:fail
|
|
84
|
-
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
|
85
|
-
rem the _cmd.exe /c_ return code!
|
|
86
|
-
set EXIT_CODE=%ERRORLEVEL%
|
|
87
|
-
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
|
88
|
-
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
|
89
|
-
exit /b %EXIT_CODE%
|
|
90
|
-
|
|
91
|
-
:mainEnd
|
|
92
|
-
if "%OS%"=="Windows_NT" endlocal
|
|
93
|
-
|
|
94
|
-
:omega
|
|
1
|
+
@rem
|
|
2
|
+
@rem Copyright 2015 the original author or authors.
|
|
3
|
+
@rem
|
|
4
|
+
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
@rem you may not use this file except in compliance with the License.
|
|
6
|
+
@rem You may obtain a copy of the License at
|
|
7
|
+
@rem
|
|
8
|
+
@rem https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
@rem
|
|
10
|
+
@rem Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
@rem See the License for the specific language governing permissions and
|
|
14
|
+
@rem limitations under the License.
|
|
15
|
+
@rem
|
|
16
|
+
@rem SPDX-License-Identifier: Apache-2.0
|
|
17
|
+
@rem
|
|
18
|
+
|
|
19
|
+
@if "%DEBUG%"=="" @echo off
|
|
20
|
+
@rem ##########################################################################
|
|
21
|
+
@rem
|
|
22
|
+
@rem gradlew startup script for Windows
|
|
23
|
+
@rem
|
|
24
|
+
@rem ##########################################################################
|
|
25
|
+
|
|
26
|
+
@rem Set local scope for the variables, and ensure extensions are enabled
|
|
27
|
+
setlocal EnableExtensions
|
|
28
|
+
|
|
29
|
+
set DIRNAME=%~dp0
|
|
30
|
+
if "%DIRNAME%"=="" set DIRNAME=.
|
|
31
|
+
@rem This is normally unused
|
|
32
|
+
set APP_BASE_NAME=%~n0
|
|
33
|
+
set APP_HOME=%DIRNAME%
|
|
34
|
+
|
|
35
|
+
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
|
36
|
+
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
|
37
|
+
|
|
38
|
+
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
|
39
|
+
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
|
40
|
+
|
|
41
|
+
@rem Find java.exe
|
|
42
|
+
if defined JAVA_HOME goto findJavaFromJavaHome
|
|
43
|
+
|
|
44
|
+
set JAVA_EXE=java.exe
|
|
45
|
+
%JAVA_EXE% -version >NUL 2>&1
|
|
46
|
+
if %ERRORLEVEL% equ 0 goto execute
|
|
47
|
+
|
|
48
|
+
echo. 1>&2
|
|
49
|
+
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
|
|
50
|
+
echo. 1>&2
|
|
51
|
+
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
|
52
|
+
echo location of your Java installation. 1>&2
|
|
53
|
+
|
|
54
|
+
"%COMSPEC%" /c exit 1
|
|
55
|
+
|
|
56
|
+
:findJavaFromJavaHome
|
|
57
|
+
set JAVA_HOME=%JAVA_HOME:"=%
|
|
58
|
+
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
|
59
|
+
|
|
60
|
+
if exist "%JAVA_EXE%" goto execute
|
|
61
|
+
|
|
62
|
+
echo. 1>&2
|
|
63
|
+
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
|
|
64
|
+
echo. 1>&2
|
|
65
|
+
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
|
66
|
+
echo location of your Java installation. 1>&2
|
|
67
|
+
|
|
68
|
+
"%COMSPEC%" /c exit 1
|
|
69
|
+
|
|
70
|
+
:execute
|
|
71
|
+
@rem Setup the command line
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
@rem Execute gradlew
|
|
76
|
+
@rem endlocal doesn't take effect until after the line is parsed and variables are expanded
|
|
77
|
+
@rem which allows us to clear the local environment before executing the java command
|
|
78
|
+
endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* & call :exitWithErrorLevel
|
|
79
|
+
|
|
80
|
+
:exitWithErrorLevel
|
|
81
|
+
@rem Use "%COMSPEC%" /c exit to allow operators to work properly in scripts
|
|
82
|
+
"%COMSPEC%" /c exit %ERRORLEVEL%
|
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
ext {
|
|
2
|
+
kotlin_version = '2.4.20'
|
|
3
|
+
androidxCoreKTXVersion = '1.19.0'
|
|
4
|
+
androidxExifInterfaceVersion = '1.4.2'
|
|
5
|
+
androidxMaterialVersion = '1.14.0'
|
|
2
6
|
minSdkVersion = 26
|
|
3
|
-
compileSdkVersion =
|
|
4
|
-
targetSdkVersion =
|
|
5
|
-
androidxActivityVersion = '1.
|
|
6
|
-
androidxAppCompatVersion = '1.
|
|
7
|
+
compileSdkVersion = 37
|
|
8
|
+
targetSdkVersion = 37
|
|
9
|
+
androidxActivityVersion = '1.13.0'
|
|
10
|
+
androidxAppCompatVersion = '1.8.0'
|
|
7
11
|
androidxCoordinatorLayoutVersion = '1.3.0'
|
|
8
|
-
androidxCoreVersion = '1.
|
|
9
|
-
androidxFragmentVersion = '1.
|
|
12
|
+
androidxCoreVersion = '1.19.0'
|
|
13
|
+
androidxFragmentVersion = '1.9.0'
|
|
10
14
|
coreSplashScreenVersion = '1.2.0'
|
|
11
|
-
androidxWebkitVersion = '1.
|
|
15
|
+
androidxWebkitVersion = '1.17.0'
|
|
12
16
|
junitVersion = '4.13.2'
|
|
13
17
|
androidxJunitVersion = '1.3.0'
|
|
14
18
|
androidxEspressoCoreVersion = '3.7.0'
|
|
15
|
-
cordovaAndroidVersion = '
|
|
16
|
-
}
|
|
19
|
+
cordovaAndroidVersion = '15.1.0'
|
|
20
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"appId": "com.regula.example.idv.capacitor",
|
|
3
|
+
"appName": "IDV",
|
|
4
|
+
"webDir": "www",
|
|
5
|
+
"cordova": {
|
|
6
|
+
"preferences": {
|
|
7
|
+
"GradlePluginKotlinVersion": "2.4.20"
|
|
8
|
+
}
|
|
9
|
+
},
|
|
10
|
+
"plugins": {
|
|
11
|
+
"SystemBars": {
|
|
12
|
+
"insetsHandling": "disable"
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -1,16 +1,11 @@
|
|
|
1
|
-
import '
|
|
1
|
+
import mainHtml from './src/main.html?raw'
|
|
2
2
|
import '/src/main.css'
|
|
3
|
-
import { setupIonicReact } from '@ionic/react'
|
|
4
|
-
import { StatusBar, Style } from '@capacitor/status-bar'
|
|
5
3
|
import { main } from './src/main'
|
|
6
4
|
|
|
7
5
|
document.addEventListener('deviceready', async () => {
|
|
8
|
-
document.getElementById("content").innerHTML =
|
|
6
|
+
document.getElementById("content").innerHTML = mainHtml
|
|
9
7
|
await new Promise(resolve => requestAnimationFrame(() => requestAnimationFrame(resolve)))
|
|
10
8
|
document.dispatchEvent(new Event('ready'))
|
|
11
9
|
})
|
|
12
10
|
|
|
13
11
|
document.addEventListener('ready', main)
|
|
14
|
-
|
|
15
|
-
setupIonicReact()
|
|
16
|
-
StatusBar.setStyle({ style: Style.Light })
|
|
@@ -1,49 +1,14 @@
|
|
|
1
1
|
import UIKit
|
|
2
|
-
import Capacitor
|
|
3
2
|
|
|
4
|
-
@
|
|
3
|
+
@main
|
|
5
4
|
class AppDelegate: UIResponder, UIApplicationDelegate {
|
|
6
|
-
|
|
7
|
-
var window: UIWindow?
|
|
8
|
-
|
|
9
5
|
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
|
|
10
|
-
// Override point for customization after application launch.
|
|
11
6
|
return true
|
|
12
7
|
}
|
|
13
8
|
|
|
14
|
-
func
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
func applicationDidEnterBackground(_ application: UIApplication) {
|
|
20
|
-
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
|
|
21
|
-
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
func applicationWillEnterForeground(_ application: UIApplication) {
|
|
25
|
-
// Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
func applicationDidBecomeActive(_ application: UIApplication) {
|
|
29
|
-
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
|
|
9
|
+
func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
|
|
10
|
+
let configuration = UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
|
|
11
|
+
configuration.delegateClass = SceneDelegate.self
|
|
12
|
+
return configuration
|
|
30
13
|
}
|
|
31
|
-
|
|
32
|
-
func applicationWillTerminate(_ application: UIApplication) {
|
|
33
|
-
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey: Any] = [:]) -> Bool {
|
|
37
|
-
// Called when the app was launched with a url. Feel free to add additional processing here,
|
|
38
|
-
// but if you want the App API to support tracking app url opens, make sure to keep this call
|
|
39
|
-
return ApplicationDelegateProxy.shared.application(app, open: url, options: options)
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool {
|
|
43
|
-
// Called when the app was launched with an activity, including Universal Links.
|
|
44
|
-
// Feel free to add additional processing here, but if you want the App API to support
|
|
45
|
-
// tracking app url opens, make sure to keep this call
|
|
46
|
-
return ApplicationDelegateProxy.shared.application(application, continue: userActivity, restorationHandler: restorationHandler)
|
|
47
|
-
}
|
|
48
|
-
|
|
49
14
|
}
|
|
@@ -29,8 +29,6 @@
|
|
|
29
29
|
</dict>
|
|
30
30
|
<key>UILaunchStoryboardName</key>
|
|
31
31
|
<string>LaunchScreen</string>
|
|
32
|
-
<key>UIMainStoryboardFile</key>
|
|
33
|
-
<string>Main</string>
|
|
34
32
|
<key>UIRequiredDeviceCapabilities</key>
|
|
35
33
|
<array>
|
|
36
34
|
<string>armv7</string>
|
|
@@ -63,5 +61,23 @@
|
|
|
63
61
|
<string>A0000002480300</string>
|
|
64
62
|
<string>A00000045645444C2D3031</string>
|
|
65
63
|
</array>
|
|
64
|
+
<key>UIApplicationSceneManifest</key>
|
|
65
|
+
<dict>
|
|
66
|
+
<key>UIApplicationSupportsMultipleScenes</key>
|
|
67
|
+
<false/>
|
|
68
|
+
<key>UISceneConfigurations</key>
|
|
69
|
+
<dict>
|
|
70
|
+
<key>UIWindowSceneSessionRoleApplication</key>
|
|
71
|
+
<array>
|
|
72
|
+
<dict>
|
|
73
|
+
<key>UISceneConfigurationName</key>
|
|
74
|
+
<string>Default Configuration</string>
|
|
75
|
+
<key>UISceneDelegateClassName</key>
|
|
76
|
+
<string>$(PRODUCT_MODULE_NAME).SceneDelegate</string>
|
|
77
|
+
</dict>
|
|
78
|
+
</array>
|
|
79
|
+
</dict>
|
|
80
|
+
</dict>
|
|
81
|
+
|
|
66
82
|
</dict>
|
|
67
83
|
</plist>
|