@digiotech/react-native 2.0.11-beta.9 → 2.0.12
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/ios/DigioReactNative.swift +16 -12
- package/package.json +1 -1
|
@@ -96,15 +96,14 @@ class DigioReactNative: RCTEventEmitter, DigioKycResponseDelegate,DigioEsignDele
|
|
|
96
96
|
if rootViewController != nil {
|
|
97
97
|
do{
|
|
98
98
|
|
|
99
|
-
try DigioKycBuilder()
|
|
99
|
+
let builder = try DigioKycBuilder()
|
|
100
100
|
.withController(viewController: rootViewController!)
|
|
101
101
|
.setLogo(logo: logo ?? "")
|
|
102
|
-
// .setEnvironment(environment: sdkEnvironment.elementsEqual("sandbox") ? DigioEnvironment.SANDBOX : DigioEnvironment.PRODUCTION)
|
|
103
102
|
.setEnvironment(
|
|
104
103
|
environment:
|
|
105
|
-
|
|
104
|
+
sdkEnvironment.lowercased() == "sandbox"
|
|
106
105
|
? DigioEnvironment.SANDBOX
|
|
107
|
-
: sdkEnvironment.lowercased()
|
|
106
|
+
: sdkEnvironment.lowercased() == "development"
|
|
108
107
|
? DigioEnvironment.DEV
|
|
109
108
|
: DigioEnvironment.PRODUCTION
|
|
110
109
|
)
|
|
@@ -113,15 +112,20 @@ class DigioReactNative: RCTEventEmitter, DigioKycResponseDelegate,DigioEsignDele
|
|
|
113
112
|
referenceId: "",
|
|
114
113
|
uniqueRequestId: ""
|
|
115
114
|
)
|
|
116
|
-
|
|
115
|
+
.setCaptureConfig(captureConfig: captureConfig)
|
|
117
116
|
.setStatelessResponseDelegate(delegate: self)
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
117
|
+
|
|
118
|
+
if clientToken.isEmpty {
|
|
119
|
+
try builder.build(
|
|
120
|
+
clientId: clientId,
|
|
121
|
+
clientSecretKey: clientSecretKey
|
|
122
|
+
)
|
|
123
|
+
} else {
|
|
124
|
+
try builder.build(
|
|
125
|
+
token: clientToken,
|
|
126
|
+
clientId: clientId
|
|
127
|
+
)
|
|
128
|
+
}
|
|
125
129
|
|
|
126
130
|
}catch {
|
|
127
131
|
reject("Error", error.localizedDescription, error)
|