@velocitycareerlabs/vcl-react-native 1.14.6 → 1.14.8
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/android/src/main/java/io/velocitycareerlabs/reactnative/.DS_Store +0 -0
- package/android/src/main/java/io/velocitycareerlabs/reactnative/GlobalConfig.kt +20 -0
- package/android/src/main/java/io/velocitycareerlabs/reactnative/VclReactNativeModule.kt +19 -4
- package/android/src/main/java/io/velocitycareerlabs/reactnative/extensions/MapExtensions.kt +8 -8
- package/android/src/main/java/io/velocitycareerlabs/reactnative/utlis/Converter.kt +2 -5
- package/android/src/main/java/io/velocitycareerlabs/reactnative/utlis/VCLLog.kt +128 -0
- package/ios/.DS_Store +0 -0
- package/ios/GlobalConfig.swift +22 -0
- package/ios/Utils/VCLLog.swift +42 -0
- package/ios/VclReactNative.swift +20 -9
- package/ios/VclReactNative.xcodeproj/project.pbxproj +2 -0
- package/ios/VclReactNative.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- package/ios/VclReactNative.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/ios/VclReactNative.xcodeproj/project.xcworkspace/xcuserdata/michaelavoyan.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/ios/VclReactNative.xcodeproj/xcuserdata/michaelavoyan.xcuserdatad/xcschemes/xcschememanagement.plist +14 -0
- package/package.json +1 -1
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Created by Michael Avoyan on 08/08/2023.
|
|
3
|
+
*
|
|
4
|
+
* Copyright 2022 Velocity Career Labs inc.
|
|
5
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
package io.velocitycareerlabs.reactnative
|
|
9
|
+
|
|
10
|
+
import io.velocitycareerlabs.api.VCLEnvironment
|
|
11
|
+
|
|
12
|
+
internal object GlobalConfig {
|
|
13
|
+
|
|
14
|
+
var CurrentEnvironment = VCLEnvironment.Prod
|
|
15
|
+
|
|
16
|
+
var IsDebugOn = false //BuildConfig.DEBUG
|
|
17
|
+
|
|
18
|
+
const val LogTagPrefix = "VCL RN Android "
|
|
19
|
+
val IsLoggerOn get() = CurrentEnvironment != VCLEnvironment.Prod || IsDebugOn
|
|
20
|
+
}
|
|
@@ -35,11 +35,13 @@ import io.velocitycareerlabs.reactnative.utlis.Converter.mapToVerifiedProfileDes
|
|
|
35
35
|
import io.velocitycareerlabs.reactnative.utlis.Converter.verifiedProfileToMap
|
|
36
36
|
import io.velocitycareerlabs.api.VCLProvider
|
|
37
37
|
import io.velocitycareerlabs.api.entities.VCLError
|
|
38
|
+
import io.velocitycareerlabs.api.entities.VCLInitializationDescriptor
|
|
38
39
|
import io.velocitycareerlabs.reactnative.extensions.toThrowable
|
|
39
40
|
import io.velocitycareerlabs.reactnative.utlis.Converter.didJwkToMap
|
|
40
41
|
import io.velocitycareerlabs.reactnative.utlis.Converter.mapToDidJwk
|
|
41
42
|
import io.velocitycareerlabs.reactnative.utlis.Converter.mapToInitializationDescriptor
|
|
42
43
|
import io.velocitycareerlabs.reactnative.utlis.Converter.mapToJwtDescriptor
|
|
44
|
+
import io.velocitycareerlabs.reactnative.utlis.VCLLog
|
|
43
45
|
import java.lang.Exception
|
|
44
46
|
|
|
45
47
|
/**
|
|
@@ -47,6 +49,8 @@ import java.lang.Exception
|
|
|
47
49
|
*/
|
|
48
50
|
class VclReactNativeModule(private val reactContext: ReactApplicationContext) : ReactContextBaseJavaModule(reactContext) {
|
|
49
51
|
|
|
52
|
+
val TAG = "VclReactNativeModule"
|
|
53
|
+
|
|
50
54
|
companion object {
|
|
51
55
|
const val ModuleName = "VclReactNative"
|
|
52
56
|
}
|
|
@@ -57,17 +61,26 @@ class VclReactNativeModule(private val reactContext: ReactApplicationContext) :
|
|
|
57
61
|
return ModuleName
|
|
58
62
|
}
|
|
59
63
|
|
|
64
|
+
private fun initGlobalConfigurations(
|
|
65
|
+
initializationDescriptor: VCLInitializationDescriptor
|
|
66
|
+
) {
|
|
67
|
+
GlobalConfig.CurrentEnvironment = initializationDescriptor.environment
|
|
68
|
+
GlobalConfig.IsDebugOn = initializationDescriptor.isDebugOn
|
|
69
|
+
}
|
|
70
|
+
|
|
60
71
|
@ReactMethod
|
|
61
72
|
fun initialize(
|
|
62
|
-
|
|
73
|
+
initializationDescriptorMap: ReadableMap,
|
|
63
74
|
promise: Promise
|
|
64
75
|
) {
|
|
65
76
|
try {
|
|
77
|
+
val initializationDescriptor = mapToInitializationDescriptor(
|
|
78
|
+
initializationDescriptorMap
|
|
79
|
+
)
|
|
80
|
+
initGlobalConfigurations(initializationDescriptor)
|
|
66
81
|
vcl.initialize(
|
|
67
82
|
context = reactContext.applicationContext,
|
|
68
|
-
initializationDescriptor =
|
|
69
|
-
initializationDescriptor
|
|
70
|
-
),
|
|
83
|
+
initializationDescriptor = initializationDescriptor,
|
|
71
84
|
successHandler = {
|
|
72
85
|
promise.resolve("VCL initialization succeed!")
|
|
73
86
|
},
|
|
@@ -192,7 +205,9 @@ class VclReactNativeModule(private val reactContext: ReactApplicationContext) :
|
|
|
192
205
|
promise: Promise
|
|
193
206
|
) {
|
|
194
207
|
try {
|
|
208
|
+
VCLLog.d(TAG, "credentialManifestDescriptorMap map: $credentialManifestDescriptorMap")
|
|
195
209
|
mapToCredentialManifestDescriptor(credentialManifestDescriptorMap)?.let { credentialManifestDescriptor ->
|
|
210
|
+
VCLLog.d(TAG, "credentialManifestDescriptor VCL entity: ${credentialManifestDescriptor.toPropsString()}")
|
|
196
211
|
vcl.getCredentialManifest(credentialManifestDescriptor,
|
|
197
212
|
{
|
|
198
213
|
promise.resolve(credentialManifestToMap(it))
|
|
@@ -23,7 +23,7 @@ fun ReadableMap.getBooleanOpt(key: String): Boolean? {
|
|
|
23
23
|
return try {
|
|
24
24
|
this.getBoolean(key)
|
|
25
25
|
} catch (e: Exception) {
|
|
26
|
-
e.printStackTrace()
|
|
26
|
+
// e.printStackTrace()
|
|
27
27
|
null
|
|
28
28
|
}
|
|
29
29
|
}
|
|
@@ -36,7 +36,7 @@ fun ReadableMap.getDoubleOpt(key: String): Double? {
|
|
|
36
36
|
return try {
|
|
37
37
|
this.getDouble(key)
|
|
38
38
|
} catch (e: Exception) {
|
|
39
|
-
e.printStackTrace()
|
|
39
|
+
// e.printStackTrace()
|
|
40
40
|
null
|
|
41
41
|
}
|
|
42
42
|
}
|
|
@@ -49,7 +49,7 @@ fun ReadableMap.getIntOpt(key: String): Int? {
|
|
|
49
49
|
return try {
|
|
50
50
|
this.getInt(key)
|
|
51
51
|
} catch (e: Exception) {
|
|
52
|
-
e.printStackTrace()
|
|
52
|
+
// e.printStackTrace()
|
|
53
53
|
null
|
|
54
54
|
}
|
|
55
55
|
}
|
|
@@ -62,7 +62,7 @@ fun ReadableMap.getStringOpt(key: String): String? {
|
|
|
62
62
|
return try {
|
|
63
63
|
this.getString(key)
|
|
64
64
|
} catch (e: Exception) {
|
|
65
|
-
e.printStackTrace()
|
|
65
|
+
// e.printStackTrace()
|
|
66
66
|
null
|
|
67
67
|
}
|
|
68
68
|
}
|
|
@@ -75,7 +75,7 @@ fun ReadableMap.getArrayOpt(key: String): ReadableArray? {
|
|
|
75
75
|
return try {
|
|
76
76
|
this.getArray(key)
|
|
77
77
|
} catch (e: Exception) {
|
|
78
|
-
e.printStackTrace()
|
|
78
|
+
// e.printStackTrace()
|
|
79
79
|
null
|
|
80
80
|
}
|
|
81
81
|
}
|
|
@@ -88,7 +88,7 @@ fun ReadableMap.getMapOpt(key: String): ReadableMap? {
|
|
|
88
88
|
return try {
|
|
89
89
|
this.getMap(key)
|
|
90
90
|
} catch (e: Exception) {
|
|
91
|
-
e.printStackTrace()
|
|
91
|
+
// e.printStackTrace()
|
|
92
92
|
null
|
|
93
93
|
}
|
|
94
94
|
}
|
|
@@ -101,7 +101,7 @@ fun ReadableMap.toJsonObject(): JSONObject {
|
|
|
101
101
|
return try {
|
|
102
102
|
JSONObject(this.toHashMap())
|
|
103
103
|
} catch (e: Exception) {
|
|
104
|
-
e.printStackTrace()
|
|
104
|
+
// e.printStackTrace()
|
|
105
105
|
JSONObject()
|
|
106
106
|
}
|
|
107
107
|
}
|
|
@@ -114,7 +114,7 @@ fun ReadableArray.toJsonArray(): JSONArray {
|
|
|
114
114
|
return try {
|
|
115
115
|
JSONArray(this.toArrayList())
|
|
116
116
|
} catch (e: Exception) {
|
|
117
|
-
e.printStackTrace()
|
|
117
|
+
// e.printStackTrace()
|
|
118
118
|
JSONArray()
|
|
119
119
|
}
|
|
120
120
|
}
|
|
@@ -15,9 +15,6 @@ import org.json.JSONArray
|
|
|
15
15
|
import org.json.JSONObject
|
|
16
16
|
import java.lang.Exception
|
|
17
17
|
|
|
18
|
-
/**
|
|
19
|
-
* Created by Michael Avoyan on 04/07/2021.
|
|
20
|
-
*/
|
|
21
18
|
object Converter {
|
|
22
19
|
|
|
23
20
|
fun mapToInitializationDescriptor(
|
|
@@ -448,9 +445,9 @@ object Converter {
|
|
|
448
445
|
fun mapToServiceCredentialAgentIssuer(
|
|
449
446
|
serviceMap: ReadableMap?
|
|
450
447
|
): VCLServiceCredentialAgentIssuer {
|
|
451
|
-
var payload = JSONObject(
|
|
448
|
+
var payload = JSONObject()
|
|
452
449
|
try {
|
|
453
|
-
payload =
|
|
450
|
+
payload = serviceMap?.getMapOpt("payload")?.toJsonObject() ?: JSONObject()
|
|
454
451
|
} catch (ex: Exception) {
|
|
455
452
|
ex.printStackTrace()
|
|
456
453
|
}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Created by Michael Avoyan on 08/08/2023.
|
|
3
|
+
*
|
|
4
|
+
* Copyright 2022 Velocity Career Labs inc.
|
|
5
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
package io.velocitycareerlabs.reactnative.utlis
|
|
9
|
+
|
|
10
|
+
import android.util.Log
|
|
11
|
+
import io.velocitycareerlabs.reactnative.GlobalConfig
|
|
12
|
+
|
|
13
|
+
internal object VCLLog {
|
|
14
|
+
/**
|
|
15
|
+
* Send a [.VERBOSE] log message.
|
|
16
|
+
* @param tag Used to identify the source of a log message. It usually identifies
|
|
17
|
+
* the class or activity where the log call occurs.
|
|
18
|
+
* @param msg The message you would like logged.
|
|
19
|
+
*/
|
|
20
|
+
fun v(tag: String?, msg: String): Int {
|
|
21
|
+
return if (GlobalConfig.IsLoggerOn) Log.v(GlobalConfig.LogTagPrefix +tag, msg) else -1
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Send a [.VERBOSE] log message and log the exception.
|
|
26
|
+
* @param tag Used to identify the source of a log message. It usually identifies
|
|
27
|
+
* the class or activity where the log call occurs.
|
|
28
|
+
* @param msg The message you would like logged.
|
|
29
|
+
* @param tr An exception to log
|
|
30
|
+
*/
|
|
31
|
+
fun v(tag: String?, msg: String?, tr: Throwable?): Int {
|
|
32
|
+
return if (GlobalConfig.IsLoggerOn) Log.v(GlobalConfig.LogTagPrefix +tag, msg, tr) else -1
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Send a [.DEBUG] log message.
|
|
37
|
+
* @param tag Used to identify the source of a log message. It usually identifies
|
|
38
|
+
* the class or activity where the log call occurs.
|
|
39
|
+
* @param msg The message you would like logged.
|
|
40
|
+
*/
|
|
41
|
+
fun d(tag: String?, msg: String): Int {
|
|
42
|
+
return if (GlobalConfig.IsLoggerOn) Log.d(GlobalConfig.LogTagPrefix +tag, msg) else -1
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Send a [.DEBUG] log message and log the exception.
|
|
47
|
+
* @param tag Used to identify the source of a log message. It usually identifies
|
|
48
|
+
* the class or activity where the log call occurs.
|
|
49
|
+
* @param msg The message you would like logged.
|
|
50
|
+
* @param tr An exception to log
|
|
51
|
+
*/
|
|
52
|
+
fun d(tag: String?, msg: String?, tr: Throwable?): Int {
|
|
53
|
+
return if (GlobalConfig.IsLoggerOn) Log.d(GlobalConfig.LogTagPrefix +tag, msg, tr) else -1
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Send an [.INFO] log message.
|
|
58
|
+
* @param tag Used to identify the source of a log message. It usually identifies
|
|
59
|
+
* the class or activity where the log call occurs.
|
|
60
|
+
* @param msg The message you would like logged.
|
|
61
|
+
*/
|
|
62
|
+
fun i(tag: String?, msg: String): Int {
|
|
63
|
+
return if (GlobalConfig.IsLoggerOn) Log.i(GlobalConfig.LogTagPrefix +tag, msg) else -1
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Send a [.INFO] log message and log the exception.
|
|
68
|
+
* @param tag Used to identify the source of a log message. It usually identifies
|
|
69
|
+
* the class or activity where the log call occurs.
|
|
70
|
+
* @param msg The message you would like logged.
|
|
71
|
+
* @param tr An exception to log
|
|
72
|
+
*/
|
|
73
|
+
fun i(tag: String?, msg: String?, tr: Throwable?): Int {
|
|
74
|
+
return if (GlobalConfig.IsLoggerOn) Log.i(GlobalConfig.LogTagPrefix +tag, msg, tr) else -1
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Send a [.WARN] log message.
|
|
79
|
+
* @param tag Used to identify the source of a log message. It usually identifies
|
|
80
|
+
* the class or activity where the log call occurs.
|
|
81
|
+
* @param msg The message you would like logged.
|
|
82
|
+
*/
|
|
83
|
+
fun w(tag: String?, msg: String): Int {
|
|
84
|
+
return if (GlobalConfig.IsLoggerOn) Log.w(GlobalConfig.LogTagPrefix +tag, msg) else -1
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Send a [.WARN] log message and log the exception.
|
|
89
|
+
* @param tag Used to identify the source of a log message. It usually identifies
|
|
90
|
+
* the class or activity where the log call occurs.
|
|
91
|
+
* @param msg The message you would like logged.
|
|
92
|
+
* @param tr An exception to log
|
|
93
|
+
*/
|
|
94
|
+
fun w(tag: String?, msg: String?, tr: Throwable?): Int {
|
|
95
|
+
return if (GlobalConfig.IsLoggerOn) Log.w(GlobalConfig.LogTagPrefix +tag, msg, tr) else -1
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/*
|
|
99
|
+
* Send a {@link #WARN} log message and log the exception.
|
|
100
|
+
* @param tag Used to identify the source of a log message. It usually identifies
|
|
101
|
+
* the class or activity where the log call occurs.
|
|
102
|
+
* @param tr An exception to log
|
|
103
|
+
*/
|
|
104
|
+
fun w(tag: String?, tr: Throwable?): Int {
|
|
105
|
+
return if (GlobalConfig.IsLoggerOn) Log.w(GlobalConfig.LogTagPrefix +tag, tr) else -1
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Send an [.ERROR] log message.
|
|
110
|
+
* @param tag Used to identify the source of a log message. It usually identifies
|
|
111
|
+
* the class or activity where the log call occurs.
|
|
112
|
+
* @param msg The message you would like logged.
|
|
113
|
+
*/
|
|
114
|
+
fun e(tag: String?, msg: String): Int {
|
|
115
|
+
return if (GlobalConfig.IsLoggerOn) Log.e(GlobalConfig.LogTagPrefix +tag, msg) else -1
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Send a [.ERROR] log message and log the exception.
|
|
120
|
+
* @param tag Used to identify the source of a log message. It usually identifies
|
|
121
|
+
* the class or activity where the log call occurs.
|
|
122
|
+
* @param msg The message you would like logged.
|
|
123
|
+
* @param tr An exception to log
|
|
124
|
+
*/
|
|
125
|
+
fun e(tag: String?, msg: String?, tr: Throwable?): Int {
|
|
126
|
+
return if (GlobalConfig.IsLoggerOn) Log.e(GlobalConfig.LogTagPrefix +tag, msg, tr) else -1
|
|
127
|
+
}
|
|
128
|
+
}
|
package/ios/.DS_Store
CHANGED
|
Binary file
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
//
|
|
2
|
+
// GlobalConfig.swift
|
|
3
|
+
// vcl-react-native
|
|
4
|
+
//
|
|
5
|
+
// Created by Michael Avoyan on 08/08/2023.
|
|
6
|
+
//
|
|
7
|
+
// Copyright 2022 Velocity Career Labs inc.
|
|
8
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
9
|
+
|
|
10
|
+
import Foundation
|
|
11
|
+
import VCL
|
|
12
|
+
|
|
13
|
+
struct GlobalConfig {
|
|
14
|
+
|
|
15
|
+
static var CurrentEnvironment = VCLEnvironment.Prod
|
|
16
|
+
|
|
17
|
+
static var IsDebugOn = false
|
|
18
|
+
|
|
19
|
+
static let LogTagPrefix = "VCL RN iOS "
|
|
20
|
+
|
|
21
|
+
static var IsLoggerOn: Bool { get { CurrentEnvironment != VCLEnvironment.Prod || GlobalConfig.IsDebugOn } }
|
|
22
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
//
|
|
2
|
+
// VCLLog.swift
|
|
3
|
+
// vcl-react-native
|
|
4
|
+
//
|
|
5
|
+
// Created by Michael Avoyan on 08/08/2023.
|
|
6
|
+
//
|
|
7
|
+
// Copyright 2022 Velocity Career Labs inc.
|
|
8
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
9
|
+
|
|
10
|
+
import Foundation
|
|
11
|
+
|
|
12
|
+
struct VCLLog {
|
|
13
|
+
|
|
14
|
+
enum LogLevel: String {
|
|
15
|
+
case error = "⛔️"
|
|
16
|
+
case warning = "⚠️"
|
|
17
|
+
case debug = "💬"
|
|
18
|
+
}
|
|
19
|
+
static func d(_ info: String, level: LogLevel = .debug, file: String = #file, function: String = #function, line: Int = #line) {
|
|
20
|
+
if GlobalConfig.IsLoggerOn {
|
|
21
|
+
print("\(level.rawValue), \((file as NSString).lastPathComponent), \(line), \(function), \(GlobalConfig.LogTagPrefix + info)")
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
static func w(_ warning: String, level: LogLevel = .warning, file: String = #file, function: String = #function, line: Int = #line) {
|
|
26
|
+
if GlobalConfig.IsLoggerOn {
|
|
27
|
+
print("\(level.rawValue), \((file as NSString).lastPathComponent), \(line), \(function), \(GlobalConfig.LogTagPrefix + warning)")
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
static func e(_ error: Error, level: LogLevel = .error, file: String = #file, function: String = #function, line: Int = #line) {
|
|
32
|
+
if GlobalConfig.IsLoggerOn {
|
|
33
|
+
VCLLog.e("\(error)", level: level, file: file, function: function, line: line)
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
static func e(_ error: String, level: LogLevel = .error, file: String = #file, function: String = #function, line: Int = #line) {
|
|
38
|
+
if GlobalConfig.IsLoggerOn {
|
|
39
|
+
print("\(level.rawValue), \((file as NSString).lastPathComponent), \(line), \(function), \(GlobalConfig.LogTagPrefix + error)")
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
package/ios/VclReactNative.swift
CHANGED
|
@@ -11,13 +11,22 @@ class VclReactNative: NSObject {
|
|
|
11
11
|
|
|
12
12
|
private let vcl = VCLProvider.vclInstance()
|
|
13
13
|
|
|
14
|
+
private func initGlobalConfigurations(
|
|
15
|
+
_ initializationDescriptor: VCLInitializationDescriptor
|
|
16
|
+
) {
|
|
17
|
+
GlobalConfig.CurrentEnvironment = initializationDescriptor.environment
|
|
18
|
+
GlobalConfig.IsDebugOn = initializationDescriptor.isDebugOn
|
|
19
|
+
}
|
|
20
|
+
|
|
14
21
|
@objc(initialize:withResolver:withRejecter:)
|
|
15
22
|
func initialize(
|
|
16
23
|
initializationDescriptorDictionary: [String: Any],
|
|
17
24
|
resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock
|
|
18
25
|
) {
|
|
26
|
+
let initializationDescriptor = dictionaryToInitializationDescriptor(initializationDescriptorDictionary)
|
|
27
|
+
initGlobalConfigurations(initializationDescriptor)
|
|
19
28
|
vcl.initialize(
|
|
20
|
-
initializationDescriptor:
|
|
29
|
+
initializationDescriptor: initializationDescriptor,
|
|
21
30
|
successHandler: {
|
|
22
31
|
resolve("VCL initialization succeed!")
|
|
23
32
|
},
|
|
@@ -132,15 +141,17 @@ class VclReactNative: NSObject {
|
|
|
132
141
|
credentialManifestDescriptorDictionary: [String: Any],
|
|
133
142
|
resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock
|
|
134
143
|
) {
|
|
144
|
+
VCLLog.d("credentialManifestDescriptorDictionary dictionary: \(credentialManifestDescriptorDictionary)")
|
|
135
145
|
if let credentialManifestDescriptor = dictionaryToCredentialManifestDescriptor(credentialManifestDescriptorDictionary) {
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
146
|
+
VCLLog.d("credentialManifestDescriptor VCL entity: \(credentialManifestDescriptor.toPropsString())")
|
|
147
|
+
vcl.getCredentialManifest(
|
|
148
|
+
credentialManifestDescriptor: credentialManifestDescriptor,
|
|
149
|
+
successHandler: {
|
|
150
|
+
resolve(credentialManifestToDictionary($0))
|
|
151
|
+
},
|
|
152
|
+
errorHandler: {
|
|
153
|
+
reject(nil, $0.toDictionary().toJsonString(), $0)
|
|
154
|
+
})
|
|
144
155
|
} else {
|
|
145
156
|
reject(nil, "Unexpected Credential Credential Manifest Descriptor: \(credentialManifestDescriptorDictionary)", nil)
|
|
146
157
|
}
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
134814201AA4EA6300B7C361 /* libVclReactNative.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libVclReactNative.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
|
29
29
|
289FEEA127DE121D00E58425 /* Converter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Converter.swift; sourceTree = "<group>"; };
|
|
30
30
|
289FEEA327DE121D00E58425 /* StringExtensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StringExtensions.swift; sourceTree = "<group>"; };
|
|
31
|
+
28ADE5EF2A82C7EA001A8453 /* GlobalConfig.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GlobalConfig.swift; sourceTree = "<group>"; };
|
|
31
32
|
B3E7B5891CC2AC0600A0062D /* VclReactNative.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VclReactNative.m; sourceTree = "<group>"; };
|
|
32
33
|
F4FF95D5245B92E700C19C63 /* VclReactNative-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "VclReactNative-Bridging-Header.h"; sourceTree = "<group>"; };
|
|
33
34
|
F4FF95D6245B92E800C19C63 /* VclReactNative.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VclReactNative.swift; sourceTree = "<group>"; };
|
|
@@ -73,6 +74,7 @@
|
|
|
73
74
|
children = (
|
|
74
75
|
289FEEA227DE121D00E58425 /* Extensions */,
|
|
75
76
|
289FEEA027DE121D00E58425 /* Utils */,
|
|
77
|
+
28ADE5EF2A82C7EA001A8453 /* GlobalConfig.swift */,
|
|
76
78
|
F4FF95D6245B92E800C19C63 /* VclReactNative.swift */,
|
|
77
79
|
B3E7B5891CC2AC0600A0062D /* VclReactNative.m */,
|
|
78
80
|
F4FF95D5245B92E700C19C63 /* VclReactNative-Bridging-Header.h */,
|
|
Binary file
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
+
<plist version="1.0">
|
|
4
|
+
<dict>
|
|
5
|
+
<key>SchemeUserState</key>
|
|
6
|
+
<dict>
|
|
7
|
+
<key>VclReactNative.xcscheme_^#shared#^_</key>
|
|
8
|
+
<dict>
|
|
9
|
+
<key>orderHint</key>
|
|
10
|
+
<integer>0</integer>
|
|
11
|
+
</dict>
|
|
12
|
+
</dict>
|
|
13
|
+
</dict>
|
|
14
|
+
</plist>
|