scandit-react-native-datacapture-core 6.12.1 → 6.13.0

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.
@@ -5,11 +5,16 @@ def safeExtGet(prop, fallback) {
5
5
  buildscript {
6
6
  ext {
7
7
  kotlin_version = "1.5.31"
8
+ agp_version = "7.0.3"
8
9
  }
10
+
9
11
  repositories {
12
+ google()
10
13
  mavenCentral()
11
14
  }
15
+
12
16
  dependencies {
17
+ classpath "com.android.tools.build:gradle:$agp_version"
13
18
  classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
14
19
  }
15
20
  }
@@ -33,7 +38,7 @@ android {
33
38
  }
34
39
 
35
40
  dependencies {
36
- def sdk_version = "6.12.1"
41
+ def sdk_version = "6.13.0"
37
42
 
38
43
  api "com.scandit.datacapture:core:$sdk_version"
39
44
 
@@ -30,6 +30,9 @@ class RNTSDCDataCaptureViewManager: RCTViewManager, RNTDataCaptureViewListener {
30
30
  }
31
31
 
32
32
  deinit {
33
+ if bridge == nil {
34
+ return;
35
+ }
33
36
  guard let coreModule =
34
37
  bridge.module(for: ScanditDataCaptureCore.self) as? ScanditDataCaptureCore else { return }
35
38
  coreModule.removeRNTDataCaptureViewListener(self)
@@ -9,7 +9,7 @@ var DataCaptureVersion = /** @class */ (function () {
9
9
  }
10
10
  Object.defineProperty(DataCaptureVersion, "pluginVersion", {
11
11
  get: function () {
12
- return '6.12.1';
12
+ return '6.13.0';
13
13
  },
14
14
  enumerable: false,
15
15
  configurable: true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "scandit-react-native-datacapture-core",
3
- "version": "6.12.1",
3
+ "version": "6.13.0",
4
4
  "description": "Scandit Data Capture SDK for React Native",
5
5
  "homepage": "https://github.com/Scandit/scandit-react-native-datacapture-core",
6
6
  "main": "js/index.js",
@@ -16,7 +16,7 @@ Pod::Spec.new do |s|
16
16
  s.requires_arc = true
17
17
  s.module_name = "ScanditDataCaptureCore"
18
18
  s.header_dir = "ScanditDataCaptureCore"
19
- s.dependency 'ScanditCaptureCore', '= 6.12.1'
19
+ s.dependency 'ScanditCaptureCore', '= 6.13.0'
20
20
 
21
21
  s.dependency "React"
22
22
  end
@@ -1,25 +0,0 @@
1
- /*
2
- * This file is part of the Scandit Data Capture SDK
3
- *
4
- * Copyright (C) 2020- Scandit AG. All rights reserved.
5
- */
6
-
7
- package com.scandit.datacapture.reactnative.core.utils
8
-
9
- import androidx.annotation.VisibleForTesting
10
- import com.facebook.react.bridge.WritableMap
11
- import com.facebook.react.modules.core.DeviceEventManagerModule.RCTDeviceEventEmitter
12
-
13
- @VisibleForTesting
14
- class TestEventEmitter : RCTDeviceEventEmitter {
15
- private val mutableEvents = mutableListOf<Event>()
16
-
17
- val events: List<Event>
18
- get() = mutableEvents
19
-
20
- override fun emit(eventName: String, data: Any?) {
21
- mutableEvents += Event(eventName, data as WritableMap?)
22
- }
23
- }
24
-
25
- data class Event(val name: String, val data: WritableMap? = null)
@@ -1,18 +0,0 @@
1
- /*
2
- * This file is part of the Scandit Data Capture SDK
3
- *
4
- * Copyright (C) 2020- Scandit AG. All rights reserved.
5
- */
6
- @file:Suppress("MaxLineLength")
7
-
8
- package com.scandit.datacapture.reactnative.core.utils
9
-
10
- import androidx.annotation.VisibleForTesting
11
-
12
- @VisibleForTesting(otherwise = VisibleForTesting.PRIVATE)
13
- object TestLicenseProvider {
14
- /*
15
- * ./CreateLicenseKey none -k ~/Documents/sdk-private.pem -p android,ios,linux,windows,windows-desktop -mr 4k -c a6vw/V/Y/Ov50msIhmuDL7V/bQb85mTGj+Im9gtkZOU -f respect-privacy,ocr,tracking,barcode-generator,barcode-scanner,blink-id,id-capture,label-capture,barcode-scanner-for-id-capture,parser-library,parser-library-for-id-capture -a '(com\.scandit\..*)'
16
- */
17
- const val LICENSE = "AV7P5RwAHB4AO8A7VwlX7GkQyTwrDPsA0yZUdmpWyv9gT6nw5kD1tDBbTVDucnTI71RPtE5S3xzqDbmuHX5Qn4p6RVkmIGEVKjalE5hOvY6JQuPGhxa9DfE/ATnGAxYaqw+IOipuKn4DShISmj9Kt5+erxLGLDC8Givjw7JvXUXq5CM1qp/Y98cLQCsqExSnDfRzmNmAYyLH5AZtJwQLNrbuvGciiDcCWFH/WOMyVG5ZXdJHcnYNhGMtAR8kyN6JsN2+l0kTE6iSNKKslU6Vsx4YohL/QUeEFMD6J1CLdv+mbkqhbI3UZCuC0XQ5BAKR3f7G6JOr02BlKSEvQ6jWORPWCP9hyzR0wxVh7GzSIpmsVeEOEzkvB3hFcuJq+GIu2HkcHv45T1flE8rZ+yNoZEpGsgxiJBa7n8BwjftGNUhx5kTBycoZ8jLe9UfCcc6CWQXNcfwS5MwZ5DzT0JbiwDmwPkCSox9R7PnSjcyHK6ZravWOtwmtcE2ZLC/HYp/8nk/Nvy07i8ZrGaspRfc+qZfhbEb6APnvZz5ArFrSjz0sBtHI940DxeJcSpxFFFlUpZVzMrxVcxgIgu8X+a4MwABVIA4qh4yw7S3sWFx98SjTidMJ9GK2OIApHBrcHzcRjvqbYoca3glRW05VNietV7atOmiAVJ4u7ULYU4sA7ii2WmSd3qRclmL3BjkRxBgYAPalUKJ6wLIXIahd0smRDdnPe1TNjIdsAWQ3Dig0+V8hbB4bDGfA1xunTw4NZHFkXZnEjXg7q1FWejHrPiMIH45/SMxWek6HdYgWyrF++3pceigYvQ=="
18
- }
@@ -1,68 +0,0 @@
1
- /*
2
- * This file is part of the Scandit Data Capture SDK
3
- *
4
- * Copyright (C) 2020- Scandit AG. All rights reserved.
5
- */
6
-
7
- package com.scandit.datacapture.reactnative.core.utils
8
-
9
- import com.facebook.react.bridge.queue.MessageQueueThread
10
- import com.facebook.react.bridge.queue.MessageQueueThreadPerfStats
11
- import com.facebook.react.bridge.queue.ReactQueueConfiguration
12
- import java.util.concurrent.Callable
13
- import java.util.concurrent.Future
14
- import java.util.concurrent.TimeUnit
15
-
16
- object TestReactQueueConfiguration : ReactQueueConfiguration {
17
- override fun getUIQueueThread(): MessageQueueThread = DirectMessageQueueThread
18
-
19
- override fun getNativeModulesQueueThread(): MessageQueueThread = DirectMessageQueueThread
20
-
21
- override fun getJSQueueThread(): MessageQueueThread = DirectMessageQueueThread
22
-
23
- override fun destroy() {
24
- // Do nothing.
25
- }
26
- }
27
-
28
- object DirectMessageQueueThread : MessageQueueThread {
29
- override fun runOnQueue(runnable: Runnable) {
30
- runnable.run()
31
- }
32
-
33
- override fun <T : Any?> callOnQueue(callable: Callable<T>): Future<T> {
34
- val result = callable.call()
35
-
36
- return object : Future<T> {
37
- override fun isDone(): Boolean = true
38
-
39
- override fun get(): T = result
40
-
41
- override fun get(timeout: Long, unit: TimeUnit?): T = result
42
-
43
- override fun cancel(mayInterruptIfRunning: Boolean): Boolean = false
44
-
45
- override fun isCancelled(): Boolean = false
46
- }
47
- }
48
-
49
- override fun isOnThread(): Boolean = true
50
-
51
- override fun assertIsOnThread() {
52
- // Do nothing.
53
- }
54
-
55
- override fun assertIsOnThread(message: String?) {
56
- // Do nothing.
57
- }
58
-
59
- override fun quitSynchronous() {
60
- // Do nothing.
61
- }
62
-
63
- override fun getPerfStats(): MessageQueueThreadPerfStats = MessageQueueThreadPerfStats()
64
-
65
- override fun resetPerfStats() {
66
- // Do nothing.
67
- }
68
- }
@@ -1,102 +0,0 @@
1
- /*
2
- * This file is part of the Scandit Data Capture SDK
3
- *
4
- * Copyright (C) 2020- Scandit AG. All rights reserved.
5
- */
6
-
7
- package com.scandit.datacapture.reactnative.core.utils
8
-
9
- import androidx.annotation.VisibleForTesting
10
- import com.facebook.react.bridge.Promise
11
- import com.facebook.react.bridge.WritableMap
12
- import com.scandit.datacapture.reactnative.core.utils.TestPromise.Status.*
13
-
14
- @VisibleForTesting(otherwise = VisibleForTesting.PRIVATE)
15
- fun promise(): TestPromise = TestPromise()
16
-
17
- class TestPromise : Promise {
18
- var value: Any? = null
19
- private set
20
-
21
- var code: String? = null
22
- private set
23
-
24
- var message: String? = null
25
- private set
26
-
27
- var throwable: Throwable? = null
28
- private set
29
-
30
- var userInfo: WritableMap? = null
31
- private set
32
-
33
- var status: Status = PENDING
34
- private set
35
-
36
- override fun resolve(value: Any?) {
37
- if (status == PENDING) {
38
- this.value = value
39
-
40
- status = RESOLVED
41
- }
42
- }
43
-
44
- override fun reject(code: String?, message: String?) {
45
- reject(code, message, null, null)
46
- }
47
-
48
- override fun reject(code: String?, throwable: Throwable?) {
49
- reject(code, null, throwable, null)
50
- }
51
-
52
- override fun reject(code: String?, message: String?, throwable: Throwable?) {
53
- reject(code, message, throwable, null)
54
- }
55
-
56
- override fun reject(throwable: Throwable?) {
57
- reject(null, null, throwable, null)
58
- }
59
-
60
- override fun reject(throwable: Throwable?, userInfo: WritableMap?) {
61
- reject(null, null, throwable, userInfo)
62
- }
63
-
64
- override fun reject(code: String?, userInfo: WritableMap) {
65
- reject(code, null, null, userInfo)
66
- }
67
-
68
- override fun reject(code: String?, throwable: Throwable?, userInfo: WritableMap?) {
69
- reject(code, null, throwable, userInfo)
70
- }
71
-
72
- override fun reject(code: String?, message: String?, userInfo: WritableMap) {
73
- reject(code, message, null, userInfo)
74
- }
75
-
76
- override fun reject(
77
- code: String?,
78
- message: String?,
79
- throwable: Throwable?,
80
- userInfo: WritableMap?
81
- ) {
82
- if (status == PENDING) {
83
- this.code = code
84
- this.message = message
85
- this.throwable = throwable
86
- this.userInfo = userInfo
87
-
88
- status = REJECTED
89
- }
90
- }
91
-
92
- override fun reject(message: String?) {
93
- throw UnsupportedOperationException("Deprecated.")
94
- }
95
-
96
- override fun toString(): String {
97
- return "TestPromise(value=$value, code=$code, message=$message, throwable=$throwable, " +
98
- "userInfo=$userInfo, status=$status)"
99
- }
100
-
101
- enum class Status { PENDING, RESOLVED, REJECTED }
102
- }