@sumsub/cordova-idensic-mobile-sdk-plugin 1.18.2 → 1.18.4

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.
Files changed (37) hide show
  1. package/demo/config.xml +1 -1
  2. package/demo/package-lock.json +3544 -3526
  3. package/demo/package.json +1 -1
  4. package/demo/platforms/android/android.json +3 -3
  5. package/demo/platforms/android/app/src/main/AndroidManifest.xml +2 -2
  6. package/demo/platforms/android/app/src/main/java/main/java/com/sumsub/msdk/plugins/cordova/SNSMobileSdkCordovaPlugin.java +24 -14
  7. package/demo/platforms/android/app/src/main/res/xml/config.xml +3 -3
  8. package/demo/platforms/android/build.gradle +1 -1
  9. package/demo/platforms/android/cordova-idensic-mobile-sdk-plugin/SumSubCordova-build-extras.gradle +2 -2
  10. package/demo/platforms/android/platform_www/cordova_plugins.js +1 -1
  11. package/demo/platforms/android/platform_www/plugins/cordova-idensic-mobile-sdk-plugin/dist/SNSMobileSDK.js +1 -1
  12. package/demo/platforms/ios/Podfile +1 -1
  13. package/demo/platforms/ios/Podfile.lock +7 -7
  14. package/demo/platforms/ios/SumSubCordova/Plugins/cordova-idensic-mobile-sdk-plugin/SNSMobileSdkCordovaPlugin.m +11 -1
  15. package/demo/platforms/ios/SumSubCordova/SumSubCordova-Info.plist +5 -5
  16. package/demo/platforms/ios/SumSubCordova/config.xml +4 -4
  17. package/demo/platforms/ios/SumSubCordova.xcodeproj/project.pbxproj +8 -8
  18. package/demo/platforms/ios/ios.json +1 -1
  19. package/demo/platforms/ios/platform_www/cordova_plugins.js +1 -1
  20. package/demo/platforms/ios/platform_www/plugins/cordova-idensic-mobile-sdk-plugin/dist/SNSMobileSDK.js +1 -1
  21. package/demo/platforms/ios/pods.json +1 -1
  22. package/demo/plugins/cordova-idensic-mobile-sdk-plugin/dist/SNSMobileSDK.js +1 -1
  23. package/demo/plugins/cordova-idensic-mobile-sdk-plugin/package.json +1 -1
  24. package/demo/plugins/cordova-idensic-mobile-sdk-plugin/plugin.xml +4 -4
  25. package/demo/plugins/cordova-idensic-mobile-sdk-plugin/src/android/build-extras.gradle +2 -2
  26. package/demo/plugins/cordova-idensic-mobile-sdk-plugin/src/android/build.gradle +2 -1
  27. package/demo/plugins/cordova-idensic-mobile-sdk-plugin/src/android/src/main/java/com/sumsub/msdk/plugins/cordova/SNSMobileSdkCordovaPlugin.java +24 -14
  28. package/demo/plugins/cordova-idensic-mobile-sdk-plugin/src/ios/SNSMobileSdkCordovaPlugin.m +11 -1
  29. package/dist/SNSMobileSDK.js +1 -1
  30. package/package.json +1 -1
  31. package/plugin.xml +4 -4
  32. package/src/android/build-extras.gradle +2 -2
  33. package/src/android/build.gradle +2 -1
  34. package/src/android/src/main/java/com/sumsub/msdk/plugins/cordova/SNSMobileSdkCordovaPlugin.java +24 -14
  35. package/src/ios/SNSMobileSdkCordovaPlugin.m +11 -1
  36. package/demo/plugins/cordova-idensic-mobile-sdk-plugin/src/android/dependencies.gradle +0 -122
  37. package/src/android/dependencies.gradle +0 -122
package/demo/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "helloworld",
3
3
  "displayName": "HelloCordova",
4
- "version": "1.18.2",
4
+ "version": "1.18.3",
5
5
  "description": "A sample Apache Cordova application",
6
6
  "main": "index.js",
7
7
  "scripts": {
@@ -37,11 +37,11 @@
37
37
  "count": 1
38
38
  },
39
39
  {
40
- "xml": "<preference name=\"android-targetSdkVersion\" value=\"29\" />",
40
+ "xml": "<preference name=\"android-targetSdkVersion\" value=\"30\" />",
41
41
  "count": 1
42
42
  },
43
43
  {
44
- "xml": "<preference name=\"android-compileSdkVersion\" value=\"29\" />",
44
+ "xml": "<preference name=\"android-compileSdkVersion\" value=\"30\" />",
45
45
  "count": 1
46
46
  },
47
47
  {
@@ -435,6 +435,6 @@
435
435
  "cordova-plugin-whitelist": "1.3.4",
436
436
  "cordova-plugin-wkwebview-engine": "1.2.1",
437
437
  "cordova-plugin-timer": "1.0.1",
438
- "cordova-idensic-mobile-sdk-plugin": "1.18.2"
438
+ "cordova-idensic-mobile-sdk-plugin": "1.18.4"
439
439
  }
440
440
  }
@@ -1,5 +1,5 @@
1
1
  <?xml version='1.0' encoding='utf-8'?>
2
- <manifest android:hardwareAccelerated="true" android:versionCode="11802" android:versionName="1.18.2" package="com.sumsub.SumSubCordova" xmlns:android="http://schemas.android.com/apk/res/android">
2
+ <manifest android:hardwareAccelerated="true" android:versionCode="11803" android:versionName="1.18.3" package="com.sumsub.SumSubCordova" xmlns:android="http://schemas.android.com/apk/res/android">
3
3
  <supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" />
4
4
  <application android:hardwareAccelerated="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:name="androidx.multidex.MultiDexApplication" android:supportsRtl="true">
5
5
  <activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode" android:label="@string/activity_name" android:launchMode="singleTop" android:name="MainActivity" android:theme="@android:style/Theme.DeviceDefault.NoActionBar" android:windowSoftInputMode="adjustResize">
@@ -14,8 +14,8 @@
14
14
  <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
15
15
  <uses-permission android:name="android.permission.FLASHLIGHT" />
16
16
  <uses-feature android:name="android.hardware.camera" android:required="true" />
17
- <uses-permission android:name="android.permission.CAMERA" />
18
17
  <uses-permission android:name="android.permission.INTERNET" />
18
+ <uses-permission android:name="android.permission.CAMERA" />
19
19
  <uses-permission android:name="android.permission.RECORD_AUDIO" />
20
20
  <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
21
21
  <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
@@ -4,7 +4,7 @@ import android.content.Intent;
4
4
  import android.text.TextUtils;
5
5
  import android.util.Log;
6
6
  import android.webkit.ValueCallback;
7
-
7
+ import androidx.core.content.res.ResourcesCompat;
8
8
  import com.google.gson.Gson;
9
9
  import com.sumsub.sns.R;
10
10
  import com.sumsub.sns.core.SNSActionResult;
@@ -20,6 +20,8 @@ import com.sumsub.sns.core.data.model.SNSCompletionResult;
20
20
  import com.sumsub.sns.core.data.model.SNSException;
21
21
  import com.sumsub.sns.core.data.model.SNSSDKState;
22
22
  import com.sumsub.sns.core.data.model.SNSSupportItem;
23
+ import com.sumsub.sns.core.data.listener.SNSIconHandler;
24
+ import com.sumsub.sns.core.data.model.SNSInitConfig;
23
25
  import com.sumsub.sns.prooface.SNSProoface;
24
26
 
25
27
  import org.apache.cordova.CallbackContext;
@@ -68,6 +70,9 @@ public class SNSMobileSdkCordovaPlugin extends CordovaPlugin {
68
70
  String locale = conf.optString("locale");
69
71
  boolean isDebug = conf.optBoolean("debug", false);
70
72
  JSONObject hasHandlers = conf.getJSONObject("hasHandlers");
73
+ JSONObject applicantConf = conf.optJSONObject("applicantConf");
74
+ String phone = applicantConf.optString("phone");
75
+ String email = applicantConf.optString("email");
71
76
 
72
77
  if (TextUtils.isEmpty(supportEmail)) {
73
78
  supportEmail = "support@sumsub.com";
@@ -80,7 +85,7 @@ public class SNSMobileSdkCordovaPlugin extends CordovaPlugin {
80
85
  if (TextUtils.isEmpty(locale)) {
81
86
  locale = Locale.getDefault().getLanguage();
82
87
  }
83
- this.launchSNSMobileSDK(apiUrl, flowName, accessToken, supportEmail, locale, isDebug, hasHandlers, callbackContext);
88
+ this.launchSNSMobileSDK(apiUrl, flowName, accessToken, supportEmail, email, phone, locale, isDebug, hasHandlers, callbackContext);
84
89
  return true;
85
90
  } else if (action.equals(NEW_TOKEN_ACTION)) {
86
91
  newAccessToken = args.getString(0);
@@ -134,14 +139,7 @@ public class SNSMobileSdkCordovaPlugin extends CordovaPlugin {
134
139
  });
135
140
  }
136
141
 
137
- private void launchSNSMobileSDK(final String apiUrl, final String flowName, final String accessToken, String supportEmail, final String locale, final boolean isDebug, final JSONObject hasHandlers, CallbackContext callbackContext) {
138
- final SNSSupportItem supportItem = new SNSSupportItem(
139
- R.string.sns_support_EMAIL_title,
140
- R.string.sns_support_EMAIL_description,
141
- R.drawable.sns_ic_email,
142
- SNSSupportItem.Type.Email,
143
- supportEmail, null);
144
-
142
+ private void launchSNSMobileSDK(final String apiUrl, final String flowName, final String accessToken, String supportEmail, String email, String phone, final String locale, final boolean isDebug, final JSONObject hasHandlers, CallbackContext callbackContext) {
145
143
 
146
144
  cordova.getActivity().runOnUiThread(new Runnable() {
147
145
  @Override
@@ -193,7 +191,7 @@ public class SNSMobileSdkCordovaPlugin extends CordovaPlugin {
193
191
  final SNSEventHandler eventHandler = snsEvent -> {
194
192
  Map<String, Object> params = new HashMap<>();
195
193
  final Map<String, Object> payload = snsEvent.getPayload();
196
- for (String key: payload.keySet()) {
194
+ for (String key : payload.keySet()) {
197
195
  if (key.equals("isCanceled") || key.equals("isCancelled")) {
198
196
  params.put("isCancelled", (Boolean) payload.get(key));
199
197
  } else {
@@ -221,10 +219,20 @@ public class SNSMobileSdkCordovaPlugin extends CordovaPlugin {
221
219
  snsSdkBuilder = new SNSMobileSDK.Builder(cordova.getActivity(), null, flowName);
222
220
  }
223
221
 
224
- if (!apiUrl.isEmpty()) {
222
+ if (apiUrl != null && !apiUrl.isEmpty()) {
225
223
  snsSdkBuilder.withBaseUrl(apiUrl);
226
224
  }
227
225
 
226
+ final SNSSupportItem supportItem = new SNSSupportItem(
227
+ R.string.sns_support_EMAIL_title,
228
+ R.string.sns_support_EMAIL_description,
229
+ SNSSupportItem.Type.Email,
230
+ supportEmail,
231
+ null,
232
+ SNSIconHandler.SNSCommonIcons.MAIL.getImageName(),
233
+ null
234
+ );
235
+
228
236
  snsSdk = snsSdkBuilder
229
237
  .withAccessToken(accessToken, () -> {
230
238
  Timber.d("SumSub: calling onTokenExpired!");
@@ -253,10 +261,12 @@ public class SNSMobileSdkCordovaPlugin extends CordovaPlugin {
253
261
  .withEventHandler(eventHandler)
254
262
  .withSupportItems(Collections.singletonList(supportItem))
255
263
  .withLocale(new Locale(locale))
264
+ .withConf(new SNSInitConfig(email, phone))
256
265
  .build();
257
266
  snsSdk.launch();
258
267
  } catch (Exception e) {
259
268
  Timber.e(e);
269
+ callbackContext.error("Error:" + e.getMessage());
260
270
  }
261
271
 
262
272
  }
@@ -296,7 +306,7 @@ public class SNSMobileSdkCordovaPlugin extends CordovaPlugin {
296
306
  final SNSSDKState.ActionCompleted action = (SNSSDKState.ActionCompleted) state;
297
307
  final JSONObject actionResult = new JSONObject();
298
308
  actionResult.put("actionId", action.getActionId());
299
- actionResult.put("answer", action.getAnswer() != null ? action.getAnswer().getValue() : null);
309
+ actionResult.put("answer", action.getAnswer());
300
310
  result.put("actionResult", actionResult);
301
311
  }
302
312
  } catch (JSONException e) {
@@ -316,7 +326,7 @@ public class SNSMobileSdkCordovaPlugin extends CordovaPlugin {
316
326
  private String mapToString(Map<String, Object> values) {
317
327
  StringBuilder sb = new StringBuilder();
318
328
  sb.append('{');
319
- for (String key: values.keySet()) {
329
+ for (String key : values.keySet()) {
320
330
  Object value = values.get(key);
321
331
  sb.append("'");
322
332
  sb.append(key);
@@ -1,5 +1,5 @@
1
1
  <?xml version='1.0' encoding='utf-8'?>
2
- <widget android-versionCode="11802" id="com.sumsub.SumSubCordova" version="1.18.2" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
2
+ <widget android-versionCode="11803" id="com.sumsub.SumSubCordova" version="1.18.3" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
3
3
  <feature name="File">
4
4
  <param name="android-package" value="org.apache.cordova.file.FileUtils" />
5
5
  <param name="onload" value="true" />
@@ -38,8 +38,8 @@
38
38
  <allow-intent href="geo:*" />
39
39
  <allow-intent href="market:*" />
40
40
  <preference name="loglevel" value="DEBUG" />
41
- <preference name="android-buildToolsVersion" value="29.0.0" />
42
- <preference name="android-minSdkVersion" value="21" />
43
41
  <preference name="android-targetSdkVersion" value="29" />
44
42
  <preference name="android-compileSdkVersion" value="29" />
43
+ <preference name="android-buildToolsVersion" value="29.0.0" />
44
+ <preference name="android-minSdkVersion" value="21" />
45
45
  </widget>
@@ -43,7 +43,7 @@ allprojects {
43
43
  //This replaces project.properties w.r.t. build settings
44
44
  project.ext {
45
45
  defaultBuildToolsVersion="29.0.3" //String
46
- defaultMinSdkVersion=19 //Integer - Minimum requirement is Android 4.4
46
+ defaultMinSdkVersion=21 //Integer - Minimum requirement is Android 4.4
47
47
  defaultTargetSdkVersion=30 //Integer - We ALWAYS target the latest by default
48
48
  defaultCompileSdkVersion=30 //Integer - We ALWAYS compile with the latest by default
49
49
  }
@@ -1,6 +1,5 @@
1
1
  buildscript {
2
2
  repositories {
3
- maven { url "https://maven.sumsub.com/repository/maven-public/" }
4
3
  google()
5
4
  jcenter()
6
5
  mavenCentral()
@@ -17,6 +16,7 @@ allprojects {
17
16
  }
18
17
 
19
18
  dependencies {
20
- implementation "com.sumsub.sns:idensic-mobile-sdk:1.18.2"
19
+ implementation "com.sumsub.sns:idensic-mobile-sdk:1.18.4"
20
+ implementation "com.sumsub.sns:idensic-mobile-sdk-prooface:1.18.4"
21
21
  implementation 'com.google.android.material:material:1.3.0'
22
22
  }
@@ -282,6 +282,6 @@ cordova.define('cordova/plugin_list', function(require, exports, module) {
282
282
  "cordova-plugin-whitelist": "1.3.4",
283
283
  "cordova-plugin-wkwebview-engine": "1.2.1",
284
284
  "cordova-plugin-timer": "1.0.1",
285
- "cordova-idensic-mobile-sdk-plugin": "1.18.2"
285
+ "cordova-idensic-mobile-sdk-plugin": "1.18.4"
286
286
  };
287
287
  });
@@ -1,3 +1,3 @@
1
1
  cordova.define("cordova-idensic-mobile-sdk-plugin.sumsub", function(require, exports, module) {
2
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("cordova/exec")):"function"==typeof define&&define.amd?define(["cordova/exec"],t):"object"==typeof exports?exports.SNSMobileSDK=t(require("cordova/exec")):e.SNSMobileSDK=t(e["cordova/exec"])}(window,(function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=0)}([function(e,t,n){const r=n(1),o="SNSMobileSdkCordovaPlugin",i={onStatusChanged:null,onEvent:null,onActionResult:"onActionResultCompleted"};var s=null;function u(e){this.sdkConf=e}function a(e,t){return this.apiUrl=e,this.flowName=t,this.debug=!1,this.handlers={},this}u.prototype.dismiss=function(){r(e=>{},e=>{},o,"dismiss",[])},u.prototype.sendEvent=function(e,t){var n=this.sdkConf.handlers[e];if(n){var s=i[e];if(s){var u=function(e,t){r(e=>{},e=>{},o,s,[{error:e,result:t}])};n(t).then(e=>{u(null,e)}).catch(e=>{u(e||new Error("rejected"),null)})}else n(t)}},u.prototype.getNewAccessToken=function(){var e=function(e){r(e=>{},e=>{},o,"setNewAccessToken",[e])};this.sdkConf.tokenExpirationHandler().then(t=>{e(t)}).catch(t=>{console.error(t instanceof Error?t.message:t),e(null)})},u.prototype.launch=function(){let e=this;return console.log("InSumSub",JSON.stringify(this.sdkConf)),new Promise((t,n)=>{s?n(new Error("Aborted since another instance is in use!")):e.sdkConf.accessToken?e.flowName&&!e.sdkConf.apiUrl?n(new Error("API URL is required")):(s=e,r(e=>{s=null,console.log("Promise SumSub Result",JSON.stringify(e)),t(e)},e=>{s=null,console.log("Promise SumSub Error",JSON.stringify(e)),n(e)},o,"launchSNSMobileSDK",[e.sdkConf])):n(new Error("Access token is required"))})},a.prototype.withAccessToken=function(e,t){if(this.accessToken=e,!t||"function"!=typeof t)throw new Error('Invalid parameter, "expirationHandler" must be a function');return this.tokenExpirationHandler=t,this},a.prototype.withHandlers=function(e){if(!e||"object"!=typeof e)throw new Error('Invalid parameter, "withHandlers" expects a hash');return Object.keys(i).forEach(t=>{var n=e[t];if(n){if("function"!=typeof n)throw new Error('Invalid handler, "'+t+'" must be a function');this.handlers[t]=n}}),this},a.prototype.withDebug=function(e){if("boolean"!=typeof e)throw new Error('Invalid parameter, "withDebug" expects a boolean');return this.debug=e,this},a.prototype.withLocale=function(e){if("string"!=typeof e)throw new Error('Invalid parameter, "locale" must be a string');return this.locale=e,this},a.prototype.withSupportEmail=function(e){if("string"!=typeof e)throw new Error('Invalid parameter, "supportEmail" must be a string');return this.supportEmail=e,this},a.prototype.withBaseUrl=function(e){if("string"!=typeof e)throw new Error('Invalid parameter, "supportEmail" must be a string');return this.apiUrl=e,this},a.prototype.onTestEnv=function(){return this.withBaseUrl("https://test-api.sumsub.com")},a.prototype.build=function(){var e={};return Object.keys(this.handlers).forEach(t=>{e[t]=!0}),new u({apiUrl:this.apiUrl,flowName:this.flowName,accessToken:this.accessToken,tokenExpirationHandler:this.tokenExpirationHandler,handlers:this.handlers,hasHandlers:e,locale:this.locale,supportEmail:this.supportEmail,debug:this.debug})},e.exports={init:function(e,t){return(new a).withAccessToken(e,t)},Builder:function(e,t){return new a(e,t)},getNewAccessToken:function(){s&&s.getNewAccessToken()},sendEvent:function(e,t){s&&s.sendEvent(e,t)},reset:function(){s=null}}},function(t,n){t.exports=e}])}));
2
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("cordova/exec")):"function"==typeof define&&define.amd?define(["cordova/exec"],t):"object"==typeof exports?exports.SNSMobileSDK=t(require("cordova/exec")):e.SNSMobileSDK=t(e["cordova/exec"])}(window,(function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=0)}([function(e,t,n){const r=n(1),o="SNSMobileSdkCordovaPlugin",i={onStatusChanged:null,onEvent:null,onActionResult:"onActionResultCompleted"};var s=null;function a(e){this.sdkConf=e}function u(e,t){return this.apiUrl=e,this.flowName=t,this.debug=!1,this.handlers={},this.applicantConf={},this}a.prototype.dismiss=function(){r(e=>{},e=>{},o,"dismiss",[])},a.prototype.sendEvent=function(e,t){var n=this.sdkConf.handlers[e];if(n){var s=i[e];if(s){var a=function(e,t){r(e=>{},e=>{},o,s,[{error:e,result:t}])};n(t).then(e=>{a(null,e)}).catch(e=>{a(e||new Error("rejected"),null)})}else n(t)}},a.prototype.getNewAccessToken=function(){var e=function(e){r(e=>{},e=>{},o,"setNewAccessToken",[e])};this.sdkConf.tokenExpirationHandler().then(t=>{e(t)}).catch(t=>{console.error(t instanceof Error?t.message:t),e(null)})},a.prototype.launch=function(){let e=this;return console.log("InSumSub",JSON.stringify(this.sdkConf)),new Promise((t,n)=>{s?n(new Error("Aborted since another instance is in use!")):e.sdkConf.accessToken?e.flowName&&!e.sdkConf.apiUrl?n(new Error("API URL is required")):(s=e,r(e=>{s=null,console.log("Promise SumSub Result",JSON.stringify(e)),t(e)},e=>{s=null,console.log("Promise SumSub Error",JSON.stringify(e)),n(e)},o,"launchSNSMobileSDK",[e.sdkConf])):n(new Error("Access token is required"))})},u.prototype.withAccessToken=function(e,t){if(this.accessToken=e,!t||"function"!=typeof t)throw new Error('Invalid parameter, "expirationHandler" must be a function');return this.tokenExpirationHandler=t,this},u.prototype.withHandlers=function(e){if(!e||"object"!=typeof e)throw new Error('Invalid parameter, "withHandlers" expects a hash');return Object.keys(i).forEach(t=>{var n=e[t];if(n){if("function"!=typeof n)throw new Error('Invalid handler, "'+t+'" must be a function');this.handlers[t]=n}}),this},u.prototype.withDebug=function(e){if("boolean"!=typeof e)throw new Error('Invalid parameter, "withDebug" expects a boolean');return this.debug=e,this},u.prototype.withLocale=function(e){if("string"!=typeof e)throw new Error('Invalid parameter, "locale" must be a string');return this.locale=e,this},u.prototype.withSupportEmail=function(e){if("string"!=typeof e)throw new Error('Invalid parameter, "supportEmail" must be a string');return this.supportEmail=e,this},u.prototype.withApplicantConf=function(e){if(!e||"object"!=typeof e)throw new Error('Invalid parameter, "withApplicantConf" expects a hash');return this.applicantConf=e,this},u.prototype.withBaseUrl=function(e){if("string"!=typeof e)throw new Error('Invalid parameter, "baseUrl" must be a string');return this.apiUrl=e,this},u.prototype.onTestEnv=function(){return this.withBaseUrl("https://test-api.sumsub.com")},u.prototype.build=function(){var e={};return Object.keys(this.handlers).forEach(t=>{e[t]=!0}),new a({apiUrl:this.apiUrl,flowName:this.flowName,accessToken:this.accessToken,tokenExpirationHandler:this.tokenExpirationHandler,handlers:this.handlers,hasHandlers:e,locale:this.locale,supportEmail:this.supportEmail,applicantConf:this.applicantConf,debug:this.debug})},e.exports={init:function(e,t){return(new u).withAccessToken(e,t)},Builder:function(e,t){return new u(e,t)},getNewAccessToken:function(){s&&s.getNewAccessToken()},sendEvent:function(e,t){s&&s.sendEvent(e,t)},reset:function(){s=null}}},function(t,n){t.exports=e}])}));
3
3
  });
@@ -5,5 +5,5 @@ platform :ios, '10.0'
5
5
 
6
6
  target 'SumSubCordova' do
7
7
  project 'SumSubCordova.xcodeproj'
8
- pod 'IdensicMobileSDK', '=1.18.2'
8
+ pod 'IdensicMobileSDK', '=1.18.4'
9
9
  end
@@ -1,20 +1,20 @@
1
1
  PODS:
2
- - IdensicMobileSDK (1.18.2):
3
- - IdensicMobileSDK/Default (= 1.18.2)
4
- - IdensicMobileSDK/Core (1.18.2)
5
- - IdensicMobileSDK/Default (1.18.2):
2
+ - IdensicMobileSDK (1.18.4):
3
+ - IdensicMobileSDK/Default (= 1.18.4)
4
+ - IdensicMobileSDK/Core (1.18.4)
5
+ - IdensicMobileSDK/Default (1.18.4):
6
6
  - IdensicMobileSDK/Core
7
7
 
8
8
  DEPENDENCIES:
9
- - IdensicMobileSDK (= 1.18.2)
9
+ - IdensicMobileSDK (= 1.18.4)
10
10
 
11
11
  SPEC REPOS:
12
12
  https://github.com/SumSubstance/Specs.git:
13
13
  - IdensicMobileSDK
14
14
 
15
15
  SPEC CHECKSUMS:
16
- IdensicMobileSDK: 52b66f85bd4f1364bddfa43f07ff0adef44d6dd3
16
+ IdensicMobileSDK: 21940a4ab07931dad7bb7f06b0e86b21fe02d700
17
17
 
18
- PODFILE CHECKSUM: 77b29537ebc7f43ba1f8d79e329632a96db21ee2
18
+ PODFILE CHECKSUM: 8e46e12b43541a4110d7b73a55d2db3a8ab31ef6
19
19
 
20
20
  COCOAPODS: 1.10.1
@@ -31,7 +31,10 @@
31
31
 
32
32
  sdk = [SNSMobileSDK setupWithAccessToken:accessToken
33
33
  environment:environment];
34
- sdk.locale = locale;
34
+
35
+ if (locale) {
36
+ sdk.locale = locale;
37
+ }
35
38
 
36
39
  } else {
37
40
 
@@ -53,6 +56,13 @@
53
56
  sdk.logLevel = SNSLogLevel_Debug;
54
57
  }
55
58
 
59
+ if (params[@"applicantConf"][@"email"]) {
60
+ sdk.initialEmail = params[@"applicantConf"][@"email"];
61
+ }
62
+ if (params[@"applicantConf"][@"phone"]) {
63
+ sdk.initialPhone = params[@"applicantConf"][@"phone"];
64
+ }
65
+
56
66
  __weak SNSMobileSdkCordovaPlugin *weakSelf = self;
57
67
 
58
68
  [sdk tokenExpirationHandler:^(void (^ _Nonnull onComplete)(NSString * _Nullable)) {
@@ -17,11 +17,11 @@
17
17
  <key>CFBundlePackageType</key>
18
18
  <string>APPL</string>
19
19
  <key>CFBundleShortVersionString</key>
20
- <string>1.18.2</string>
20
+ <string>1.18.4</string>
21
21
  <key>CFBundleSignature</key>
22
22
  <string>????</string>
23
23
  <key>CFBundleVersion</key>
24
- <string>1.18.2</string>
24
+ <string>1.18.4</string>
25
25
  <key>ITSAppUsesNonExemptEncryption</key>
26
26
  <false/>
27
27
  <key>LSRequiresIPhoneOS</key>
@@ -32,9 +32,9 @@
32
32
  <true/>
33
33
  </dict>
34
34
  <key>NSMainNibFile</key>
35
- <string/>
35
+ <string></string>
36
36
  <key>NSMainNibFile~ipad</key>
37
- <string/>
37
+ <string></string>
38
38
  <key>UIRequiresFullScreen</key>
39
39
  <true/>
40
40
  <key>UISupportedInterfaceOrientations</key>
@@ -57,4 +57,4 @@
57
57
  <key>NSPhotoLibraryUsageDescription</key>
58
58
  <string>Let us pick a photo</string>
59
59
  </dict>
60
- </plist>
60
+ </plist>
@@ -1,5 +1,5 @@
1
1
  <?xml version='1.0' encoding='utf-8'?>
2
- <widget android-versionCode="11802" id="com.sumsub.SumSubCordova" version="1.18.2" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
2
+ <widget android-versionCode="11803" id="com.sumsub.SumSubCordova" version="1.18.3" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
3
3
  <feature name="LocalStorage">
4
4
  <param name="ios-package" value="CDVLocalStorage" />
5
5
  </feature>
@@ -36,6 +36,9 @@
36
36
  <param name="ios-package" value="NativeTimerPlugin" />
37
37
  <param name="onload" value="true" />
38
38
  </feature>
39
+ <feature name="SNSMobileSdkCordovaPlugin">
40
+ <param name="ios-package" value="SNSMobileSdkCordovaPlugin" />
41
+ </feature>
39
42
  <name>SumSubCordova</name>
40
43
  <description>
41
44
  Demonstrates the usage of the Sumsub Mobile SDK in a sample Apache Cordova application.
@@ -68,7 +71,4 @@
68
71
  <preference name="PaginationMode" value="unpaginated" />
69
72
  <preference name="WKWebViewOnly" value="true" />
70
73
  <preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine" />
71
- <feature name="SNSMobileSdkCordovaPlugin">
72
- <param name="ios-package" value="SNSMobileSdkCordovaPlugin" />
73
- </feature>
74
74
  </widget>
@@ -34,10 +34,10 @@
34
34
  84B101FD1C564B1B8BC464F4 /* CDVLocalFilesystem.m in Sources */ = {isa = PBXBuildFile; fileRef = C3988AADDC194CF89ADC5C92 /* CDVLocalFilesystem.m */; };
35
35
  90D9A0FFCB9E417ABDA71919 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C616991EB77B45F5AD21B210 /* AudioToolbox.framework */; };
36
36
  9232A4C10176415ABB9ED131 /* CDVWKProcessPoolFactory.m in Sources */ = {isa = PBXBuildFile; fileRef = E3E007E1938E4242922139EC /* CDVWKProcessPoolFactory.m */; };
37
+ A4166E84C9F04BDAB5174787 /* SNSMobileSdkCordovaPlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = FBF8D5BE820B407EB255564A /* SNSMobileSdkCordovaPlugin.m */; };
37
38
  BAE02618EDB74BB48F9AA351 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 30D9AA570EB14EE5ACFE95EA /* WebKit.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
38
39
  BAED7EE81C284A69B5E6CA66 /* AFNetworkReachabilityManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 415F9028757746F5A0934932 /* AFNetworkReachabilityManager.m */; };
39
40
  BE0828184D344B48B4A4D363 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C2E26C70C90D4B84ABD46DD3 /* AVFoundation.framework */; };
40
- C800FBC4726C4B37B30CFF73 /* SNSMobileSdkCordovaPlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 555E27F370F94A71A0087105 /* SNSMobileSdkCordovaPlugin.m */; };
41
41
  DB96AE7D4BF84FA1B8626F83 /* BinaryRequestSerializer.m in Sources */ = {isa = PBXBuildFile; fileRef = 92C75D0D45A947ABBAE9A260 /* BinaryRequestSerializer.m */; };
42
42
  E92CC7F57B0B4CF8BD07853F /* CDVAssetLibraryFilesystem.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F6D28B2462648AC86C265DE /* CDVAssetLibraryFilesystem.m */; };
43
43
  F3C34E42D20A485EA05DC94E /* BinaryResponseSerializer.m in Sources */ = {isa = PBXBuildFile; fileRef = 081F24D8145F428F9C87C369 /* BinaryResponseSerializer.m */; };
@@ -102,11 +102,11 @@
102
102
  45B07D19C4B446BCA2E75899 /* NativeTimerPlugin.m */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.c.objc; name = NativeTimerPlugin.m; path = "cordova-plugin-timer/NativeTimerPlugin.m"; sourceTree = "<group>"; };
103
103
  479DFC62F2EF401DAFE8EAC5 /* CDVLocalFilesystem.h */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.c.h; name = CDVLocalFilesystem.h; path = "cordova-plugin-file/CDVLocalFilesystem.h"; sourceTree = "<group>"; };
104
104
  4864853ED9CB45228DDD56F0 /* BinaryRequestSerializer.h */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.c.h; name = BinaryRequestSerializer.h; path = "cordova-plugin-advanced-http/BinaryRequestSerializer.h"; sourceTree = "<group>"; };
105
+ 4BB00BC827EA4C0E9D3768B2 /* SNSMobileSdkCordovaPlugin.h */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.c.h; name = SNSMobileSdkCordovaPlugin.h; path = "cordova-idensic-mobile-sdk-plugin/SNSMobileSdkCordovaPlugin.h"; sourceTree = "<group>"; };
105
106
  4C1B505A4D894E5A86AAB89A /* CDVBarcodeScanner.bundle */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.plug-in"; path = CDVBarcodeScanner.bundle; sourceTree = "<group>"; };
106
107
  4D4FF014444F453C93837C00 /* CDVWKWebViewUIDelegate.m */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.c.objc; name = CDVWKWebViewUIDelegate.m; path = "cordova-plugin-wkwebview-engine/CDVWKWebViewUIDelegate.m"; sourceTree = "<group>"; };
107
108
  4E482A7815224884878308F6 /* AFURLResponseSerialization.m */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.c.objc; name = AFURLResponseSerialization.m; path = "cordova-plugin-advanced-http/AFURLResponseSerialization.m"; sourceTree = "<group>"; };
108
109
  4F6D28B2462648AC86C265DE /* CDVAssetLibraryFilesystem.m */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.c.objc; name = CDVAssetLibraryFilesystem.m; path = "cordova-plugin-file/CDVAssetLibraryFilesystem.m"; sourceTree = "<group>"; };
109
- 555E27F370F94A71A0087105 /* SNSMobileSdkCordovaPlugin.m */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.c.objc; name = SNSMobileSdkCordovaPlugin.m; path = "cordova-idensic-mobile-sdk-plugin/SNSMobileSdkCordovaPlugin.m"; sourceTree = "<group>"; };
110
110
  5FE40B7FEAF343D28545127E /* NativeTimerAdapter.m */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.c.objc; name = NativeTimerAdapter.m; path = "cordova-plugin-timer/NativeTimerAdapter.m"; sourceTree = "<group>"; };
111
111
  698F934E2C73EC368BEFA17C /* libPods-SumSubCordova.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-SumSubCordova.a"; sourceTree = BUILT_PRODUCTS_DIR; };
112
112
  6AFF5BF81D6E424B00AB3073 /* CDVLaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = CDVLaunchScreen.storyboard; path = SumSubCordova/CDVLaunchScreen.storyboard; sourceTree = SOURCE_ROOT; };
@@ -132,7 +132,6 @@
132
132
  C2E26C70C90D4B84ABD46DD3 /* AVFoundation.framework */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
133
133
  C3988AADDC194CF89ADC5C92 /* CDVLocalFilesystem.m */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.c.objc; name = CDVLocalFilesystem.m; path = "cordova-plugin-file/CDVLocalFilesystem.m"; sourceTree = "<group>"; };
134
134
  C616991EB77B45F5AD21B210 /* AudioToolbox.framework */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
135
- C72E9E84FA284B94932571DF /* SNSMobileSdkCordovaPlugin.h */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.c.h; name = SNSMobileSdkCordovaPlugin.h; path = "cordova-idensic-mobile-sdk-plugin/SNSMobileSdkCordovaPlugin.h"; sourceTree = "<group>"; };
136
135
  C8A4955F41854E99A82FB6E6 /* AFSecurityPolicy.h */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.c.h; name = AFSecurityPolicy.h; path = "cordova-plugin-advanced-http/AFSecurityPolicy.h"; sourceTree = "<group>"; };
137
136
  CB3AC67427334803935C311F /* AFNetworking.h */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.c.h; name = AFNetworking.h; path = "cordova-plugin-advanced-http/AFNetworking.h"; sourceTree = "<group>"; };
138
137
  CC7B2429452C4DC29BE09899 /* CordovaHttpPlugin.m */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.c.objc; name = CordovaHttpPlugin.m; path = "cordova-plugin-advanced-http/CordovaHttpPlugin.m"; sourceTree = "<group>"; };
@@ -146,6 +145,7 @@
146
145
  EC1B7D4F95B64CD18F4BF69C /* CDVWKWebViewEngine.m */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.c.objc; name = CDVWKWebViewEngine.m; path = "cordova-plugin-wkwebview-engine/CDVWKWebViewEngine.m"; sourceTree = "<group>"; };
147
146
  ED33DF2A687741AEAF9F8254 /* Bridging-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Bridging-Header.h"; sourceTree = "<group>"; };
148
147
  F840E1F0165FE0F500CFE078 /* config.xml */ = {isa = PBXFileReference; lastKnownFileType = text.xml; name = config.xml; path = SumSubCordova/config.xml; sourceTree = "<group>"; };
148
+ FBF8D5BE820B407EB255564A /* SNSMobileSdkCordovaPlugin.m */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.c.objc; name = SNSMobileSdkCordovaPlugin.m; path = "cordova-idensic-mobile-sdk-plugin/SNSMobileSdkCordovaPlugin.m"; sourceTree = "<group>"; };
149
149
  /* End PBXFileReference section */
150
150
 
151
151
  /* Begin PBXFrameworksBuildPhase section */
@@ -308,8 +308,8 @@
308
308
  5FE40B7FEAF343D28545127E /* NativeTimerAdapter.m */,
309
309
  8D3B4C8F45CE419296A2B4DA /* NativeTimerPlugin.h */,
310
310
  DA500FB5BCF24920AE770CD4 /* NativeTimerAdapter.h */,
311
- 555E27F370F94A71A0087105 /* SNSMobileSdkCordovaPlugin.m */,
312
- C72E9E84FA284B94932571DF /* SNSMobileSdkCordovaPlugin.h */,
311
+ FBF8D5BE820B407EB255564A /* SNSMobileSdkCordovaPlugin.m */,
312
+ 4BB00BC827EA4C0E9D3768B2 /* SNSMobileSdkCordovaPlugin.h */,
313
313
  );
314
314
  name = Plugins;
315
315
  path = SumSubCordova/Plugins;
@@ -345,7 +345,7 @@
345
345
  1D60588D0D05DD3D006BFB54 /* Resources */,
346
346
  1D60588E0D05DD3D006BFB54 /* Sources */,
347
347
  1D60588F0D05DD3D006BFB54 /* Frameworks */,
348
- 7F60B8AEAD38A0D958BC72BE /* [CP] Embed Pods Frameworks */,
348
+ DBBF85CA37131F5856841B5A /* [CP] Embed Pods Frameworks */,
349
349
  );
350
350
  buildRules = (
351
351
  );
@@ -466,7 +466,7 @@
466
466
  shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
467
467
  showEnvVarsInLog = 0;
468
468
  };
469
- 7F60B8AEAD38A0D958BC72BE /* [CP] Embed Pods Frameworks */ = {
469
+ DBBF85CA37131F5856841B5A /* [CP] Embed Pods Frameworks */ = {
470
470
  isa = PBXShellScriptBuildPhase;
471
471
  buildActionMask = 2147483647;
472
472
  files = (
@@ -515,7 +515,7 @@
515
515
  9232A4C10176415ABB9ED131 /* CDVWKProcessPoolFactory.m in Sources */,
516
516
  3FDEBDA8236F403099029A1F /* NativeTimerPlugin.m in Sources */,
517
517
  65C92144BE6146C1A57E327B /* NativeTimerAdapter.m in Sources */,
518
- C800FBC4726C4B37B30CFF73 /* SNSMobileSdkCordovaPlugin.m in Sources */,
518
+ A4166E84C9F04BDAB5174787 /* SNSMobileSdkCordovaPlugin.m in Sources */,
519
519
  );
520
520
  runOnlyForDeploymentPostprocessing = 0;
521
521
  };
@@ -397,6 +397,6 @@
397
397
  "cordova-plugin-whitelist": "1.3.4",
398
398
  "cordova-plugin-wkwebview-engine": "1.2.1",
399
399
  "cordova-plugin-timer": "1.0.1",
400
- "cordova-idensic-mobile-sdk-plugin": "1.18.2"
400
+ "cordova-idensic-mobile-sdk-plugin": "1.18.4"
401
401
  }
402
402
  }
@@ -297,6 +297,6 @@ cordova.define('cordova/plugin_list', function(require, exports, module) {
297
297
  "cordova-plugin-whitelist": "1.3.4",
298
298
  "cordova-plugin-wkwebview-engine": "1.2.1",
299
299
  "cordova-plugin-timer": "1.0.1",
300
- "cordova-idensic-mobile-sdk-plugin": "1.18.2"
300
+ "cordova-idensic-mobile-sdk-plugin": "1.18.4"
301
301
  };
302
302
  });
@@ -1,3 +1,3 @@
1
1
  cordova.define("cordova-idensic-mobile-sdk-plugin.sumsub", function(require, exports, module) {
2
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("cordova/exec")):"function"==typeof define&&define.amd?define(["cordova/exec"],t):"object"==typeof exports?exports.SNSMobileSDK=t(require("cordova/exec")):e.SNSMobileSDK=t(e["cordova/exec"])}(window,(function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=0)}([function(e,t,n){const r=n(1),o="SNSMobileSdkCordovaPlugin",i={onStatusChanged:null,onEvent:null,onActionResult:"onActionResultCompleted"};var s=null;function u(e){this.sdkConf=e}function a(e,t){return this.apiUrl=e,this.flowName=t,this.debug=!1,this.handlers={},this}u.prototype.dismiss=function(){r(e=>{},e=>{},o,"dismiss",[])},u.prototype.sendEvent=function(e,t){var n=this.sdkConf.handlers[e];if(n){var s=i[e];if(s){var u=function(e,t){r(e=>{},e=>{},o,s,[{error:e,result:t}])};n(t).then(e=>{u(null,e)}).catch(e=>{u(e||new Error("rejected"),null)})}else n(t)}},u.prototype.getNewAccessToken=function(){var e=function(e){r(e=>{},e=>{},o,"setNewAccessToken",[e])};this.sdkConf.tokenExpirationHandler().then(t=>{e(t)}).catch(t=>{console.error(t instanceof Error?t.message:t),e(null)})},u.prototype.launch=function(){let e=this;return console.log("InSumSub",JSON.stringify(this.sdkConf)),new Promise((t,n)=>{s?n(new Error("Aborted since another instance is in use!")):e.sdkConf.accessToken?e.flowName&&!e.sdkConf.apiUrl?n(new Error("API URL is required")):(s=e,r(e=>{s=null,console.log("Promise SumSub Result",JSON.stringify(e)),t(e)},e=>{s=null,console.log("Promise SumSub Error",JSON.stringify(e)),n(e)},o,"launchSNSMobileSDK",[e.sdkConf])):n(new Error("Access token is required"))})},a.prototype.withAccessToken=function(e,t){if(this.accessToken=e,!t||"function"!=typeof t)throw new Error('Invalid parameter, "expirationHandler" must be a function');return this.tokenExpirationHandler=t,this},a.prototype.withHandlers=function(e){if(!e||"object"!=typeof e)throw new Error('Invalid parameter, "withHandlers" expects a hash');return Object.keys(i).forEach(t=>{var n=e[t];if(n){if("function"!=typeof n)throw new Error('Invalid handler, "'+t+'" must be a function');this.handlers[t]=n}}),this},a.prototype.withDebug=function(e){if("boolean"!=typeof e)throw new Error('Invalid parameter, "withDebug" expects a boolean');return this.debug=e,this},a.prototype.withLocale=function(e){if("string"!=typeof e)throw new Error('Invalid parameter, "locale" must be a string');return this.locale=e,this},a.prototype.withSupportEmail=function(e){if("string"!=typeof e)throw new Error('Invalid parameter, "supportEmail" must be a string');return this.supportEmail=e,this},a.prototype.withBaseUrl=function(e){if("string"!=typeof e)throw new Error('Invalid parameter, "supportEmail" must be a string');return this.apiUrl=e,this},a.prototype.onTestEnv=function(){return this.withBaseUrl("https://test-api.sumsub.com")},a.prototype.build=function(){var e={};return Object.keys(this.handlers).forEach(t=>{e[t]=!0}),new u({apiUrl:this.apiUrl,flowName:this.flowName,accessToken:this.accessToken,tokenExpirationHandler:this.tokenExpirationHandler,handlers:this.handlers,hasHandlers:e,locale:this.locale,supportEmail:this.supportEmail,debug:this.debug})},e.exports={init:function(e,t){return(new a).withAccessToken(e,t)},Builder:function(e,t){return new a(e,t)},getNewAccessToken:function(){s&&s.getNewAccessToken()},sendEvent:function(e,t){s&&s.sendEvent(e,t)},reset:function(){s=null}}},function(t,n){t.exports=e}])}));
2
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("cordova/exec")):"function"==typeof define&&define.amd?define(["cordova/exec"],t):"object"==typeof exports?exports.SNSMobileSDK=t(require("cordova/exec")):e.SNSMobileSDK=t(e["cordova/exec"])}(window,(function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=0)}([function(e,t,n){const r=n(1),o="SNSMobileSdkCordovaPlugin",i={onStatusChanged:null,onEvent:null,onActionResult:"onActionResultCompleted"};var s=null;function a(e){this.sdkConf=e}function u(e,t){return this.apiUrl=e,this.flowName=t,this.debug=!1,this.handlers={},this.applicantConf={},this}a.prototype.dismiss=function(){r(e=>{},e=>{},o,"dismiss",[])},a.prototype.sendEvent=function(e,t){var n=this.sdkConf.handlers[e];if(n){var s=i[e];if(s){var a=function(e,t){r(e=>{},e=>{},o,s,[{error:e,result:t}])};n(t).then(e=>{a(null,e)}).catch(e=>{a(e||new Error("rejected"),null)})}else n(t)}},a.prototype.getNewAccessToken=function(){var e=function(e){r(e=>{},e=>{},o,"setNewAccessToken",[e])};this.sdkConf.tokenExpirationHandler().then(t=>{e(t)}).catch(t=>{console.error(t instanceof Error?t.message:t),e(null)})},a.prototype.launch=function(){let e=this;return console.log("InSumSub",JSON.stringify(this.sdkConf)),new Promise((t,n)=>{s?n(new Error("Aborted since another instance is in use!")):e.sdkConf.accessToken?e.flowName&&!e.sdkConf.apiUrl?n(new Error("API URL is required")):(s=e,r(e=>{s=null,console.log("Promise SumSub Result",JSON.stringify(e)),t(e)},e=>{s=null,console.log("Promise SumSub Error",JSON.stringify(e)),n(e)},o,"launchSNSMobileSDK",[e.sdkConf])):n(new Error("Access token is required"))})},u.prototype.withAccessToken=function(e,t){if(this.accessToken=e,!t||"function"!=typeof t)throw new Error('Invalid parameter, "expirationHandler" must be a function');return this.tokenExpirationHandler=t,this},u.prototype.withHandlers=function(e){if(!e||"object"!=typeof e)throw new Error('Invalid parameter, "withHandlers" expects a hash');return Object.keys(i).forEach(t=>{var n=e[t];if(n){if("function"!=typeof n)throw new Error('Invalid handler, "'+t+'" must be a function');this.handlers[t]=n}}),this},u.prototype.withDebug=function(e){if("boolean"!=typeof e)throw new Error('Invalid parameter, "withDebug" expects a boolean');return this.debug=e,this},u.prototype.withLocale=function(e){if("string"!=typeof e)throw new Error('Invalid parameter, "locale" must be a string');return this.locale=e,this},u.prototype.withSupportEmail=function(e){if("string"!=typeof e)throw new Error('Invalid parameter, "supportEmail" must be a string');return this.supportEmail=e,this},u.prototype.withApplicantConf=function(e){if(!e||"object"!=typeof e)throw new Error('Invalid parameter, "withApplicantConf" expects a hash');return this.applicantConf=e,this},u.prototype.withBaseUrl=function(e){if("string"!=typeof e)throw new Error('Invalid parameter, "baseUrl" must be a string');return this.apiUrl=e,this},u.prototype.onTestEnv=function(){return this.withBaseUrl("https://test-api.sumsub.com")},u.prototype.build=function(){var e={};return Object.keys(this.handlers).forEach(t=>{e[t]=!0}),new a({apiUrl:this.apiUrl,flowName:this.flowName,accessToken:this.accessToken,tokenExpirationHandler:this.tokenExpirationHandler,handlers:this.handlers,hasHandlers:e,locale:this.locale,supportEmail:this.supportEmail,applicantConf:this.applicantConf,debug:this.debug})},e.exports={init:function(e,t){return(new u).withAccessToken(e,t)},Builder:function(e,t){return new u(e,t)},getNewAccessToken:function(){s&&s.getNewAccessToken()},sendEvent:function(e,t){s&&s.sendEvent(e,t)},reset:function(){s=null}}},function(t,n){t.exports=e}])}));
3
3
  });
@@ -13,7 +13,7 @@
13
13
  "libraries": {
14
14
  "IdensicMobileSDK": {
15
15
  "name": "IdensicMobileSDK",
16
- "spec": "=1.18.2",
16
+ "spec": "=1.18.4",
17
17
  "count": 1
18
18
  }
19
19
  }
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("cordova/exec")):"function"==typeof define&&define.amd?define(["cordova/exec"],t):"object"==typeof exports?exports.SNSMobileSDK=t(require("cordova/exec")):e.SNSMobileSDK=t(e["cordova/exec"])}(window,(function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=0)}([function(e,t,n){const r=n(1),o="SNSMobileSdkCordovaPlugin",i={onStatusChanged:null,onEvent:null,onActionResult:"onActionResultCompleted"};var s=null;function u(e){this.sdkConf=e}function a(e,t){return this.apiUrl=e,this.flowName=t,this.debug=!1,this.handlers={},this}u.prototype.dismiss=function(){r(e=>{},e=>{},o,"dismiss",[])},u.prototype.sendEvent=function(e,t){var n=this.sdkConf.handlers[e];if(n){var s=i[e];if(s){var u=function(e,t){r(e=>{},e=>{},o,s,[{error:e,result:t}])};n(t).then(e=>{u(null,e)}).catch(e=>{u(e||new Error("rejected"),null)})}else n(t)}},u.prototype.getNewAccessToken=function(){var e=function(e){r(e=>{},e=>{},o,"setNewAccessToken",[e])};this.sdkConf.tokenExpirationHandler().then(t=>{e(t)}).catch(t=>{console.error(t instanceof Error?t.message:t),e(null)})},u.prototype.launch=function(){let e=this;return console.log("InSumSub",JSON.stringify(this.sdkConf)),new Promise((t,n)=>{s?n(new Error("Aborted since another instance is in use!")):e.sdkConf.accessToken?e.flowName&&!e.sdkConf.apiUrl?n(new Error("API URL is required")):(s=e,r(e=>{s=null,console.log("Promise SumSub Result",JSON.stringify(e)),t(e)},e=>{s=null,console.log("Promise SumSub Error",JSON.stringify(e)),n(e)},o,"launchSNSMobileSDK",[e.sdkConf])):n(new Error("Access token is required"))})},a.prototype.withAccessToken=function(e,t){if(this.accessToken=e,!t||"function"!=typeof t)throw new Error('Invalid parameter, "expirationHandler" must be a function');return this.tokenExpirationHandler=t,this},a.prototype.withHandlers=function(e){if(!e||"object"!=typeof e)throw new Error('Invalid parameter, "withHandlers" expects a hash');return Object.keys(i).forEach(t=>{var n=e[t];if(n){if("function"!=typeof n)throw new Error('Invalid handler, "'+t+'" must be a function');this.handlers[t]=n}}),this},a.prototype.withDebug=function(e){if("boolean"!=typeof e)throw new Error('Invalid parameter, "withDebug" expects a boolean');return this.debug=e,this},a.prototype.withLocale=function(e){if("string"!=typeof e)throw new Error('Invalid parameter, "locale" must be a string');return this.locale=e,this},a.prototype.withSupportEmail=function(e){if("string"!=typeof e)throw new Error('Invalid parameter, "supportEmail" must be a string');return this.supportEmail=e,this},a.prototype.withBaseUrl=function(e){if("string"!=typeof e)throw new Error('Invalid parameter, "supportEmail" must be a string');return this.apiUrl=e,this},a.prototype.onTestEnv=function(){return this.withBaseUrl("https://test-api.sumsub.com")},a.prototype.build=function(){var e={};return Object.keys(this.handlers).forEach(t=>{e[t]=!0}),new u({apiUrl:this.apiUrl,flowName:this.flowName,accessToken:this.accessToken,tokenExpirationHandler:this.tokenExpirationHandler,handlers:this.handlers,hasHandlers:e,locale:this.locale,supportEmail:this.supportEmail,debug:this.debug})},e.exports={init:function(e,t){return(new a).withAccessToken(e,t)},Builder:function(e,t){return new a(e,t)},getNewAccessToken:function(){s&&s.getNewAccessToken()},sendEvent:function(e,t){s&&s.sendEvent(e,t)},reset:function(){s=null}}},function(t,n){t.exports=e}])}));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("cordova/exec")):"function"==typeof define&&define.amd?define(["cordova/exec"],t):"object"==typeof exports?exports.SNSMobileSDK=t(require("cordova/exec")):e.SNSMobileSDK=t(e["cordova/exec"])}(window,(function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=0)}([function(e,t,n){const r=n(1),o="SNSMobileSdkCordovaPlugin",i={onStatusChanged:null,onEvent:null,onActionResult:"onActionResultCompleted"};var s=null;function a(e){this.sdkConf=e}function u(e,t){return this.apiUrl=e,this.flowName=t,this.debug=!1,this.handlers={},this.applicantConf={},this}a.prototype.dismiss=function(){r(e=>{},e=>{},o,"dismiss",[])},a.prototype.sendEvent=function(e,t){var n=this.sdkConf.handlers[e];if(n){var s=i[e];if(s){var a=function(e,t){r(e=>{},e=>{},o,s,[{error:e,result:t}])};n(t).then(e=>{a(null,e)}).catch(e=>{a(e||new Error("rejected"),null)})}else n(t)}},a.prototype.getNewAccessToken=function(){var e=function(e){r(e=>{},e=>{},o,"setNewAccessToken",[e])};this.sdkConf.tokenExpirationHandler().then(t=>{e(t)}).catch(t=>{console.error(t instanceof Error?t.message:t),e(null)})},a.prototype.launch=function(){let e=this;return console.log("InSumSub",JSON.stringify(this.sdkConf)),new Promise((t,n)=>{s?n(new Error("Aborted since another instance is in use!")):e.sdkConf.accessToken?e.flowName&&!e.sdkConf.apiUrl?n(new Error("API URL is required")):(s=e,r(e=>{s=null,console.log("Promise SumSub Result",JSON.stringify(e)),t(e)},e=>{s=null,console.log("Promise SumSub Error",JSON.stringify(e)),n(e)},o,"launchSNSMobileSDK",[e.sdkConf])):n(new Error("Access token is required"))})},u.prototype.withAccessToken=function(e,t){if(this.accessToken=e,!t||"function"!=typeof t)throw new Error('Invalid parameter, "expirationHandler" must be a function');return this.tokenExpirationHandler=t,this},u.prototype.withHandlers=function(e){if(!e||"object"!=typeof e)throw new Error('Invalid parameter, "withHandlers" expects a hash');return Object.keys(i).forEach(t=>{var n=e[t];if(n){if("function"!=typeof n)throw new Error('Invalid handler, "'+t+'" must be a function');this.handlers[t]=n}}),this},u.prototype.withDebug=function(e){if("boolean"!=typeof e)throw new Error('Invalid parameter, "withDebug" expects a boolean');return this.debug=e,this},u.prototype.withLocale=function(e){if("string"!=typeof e)throw new Error('Invalid parameter, "locale" must be a string');return this.locale=e,this},u.prototype.withSupportEmail=function(e){if("string"!=typeof e)throw new Error('Invalid parameter, "supportEmail" must be a string');return this.supportEmail=e,this},u.prototype.withApplicantConf=function(e){if(!e||"object"!=typeof e)throw new Error('Invalid parameter, "withApplicantConf" expects a hash');return this.applicantConf=e,this},u.prototype.withBaseUrl=function(e){if("string"!=typeof e)throw new Error('Invalid parameter, "baseUrl" must be a string');return this.apiUrl=e,this},u.prototype.onTestEnv=function(){return this.withBaseUrl("https://test-api.sumsub.com")},u.prototype.build=function(){var e={};return Object.keys(this.handlers).forEach(t=>{e[t]=!0}),new a({apiUrl:this.apiUrl,flowName:this.flowName,accessToken:this.accessToken,tokenExpirationHandler:this.tokenExpirationHandler,handlers:this.handlers,hasHandlers:e,locale:this.locale,supportEmail:this.supportEmail,applicantConf:this.applicantConf,debug:this.debug})},e.exports={init:function(e,t){return(new u).withAccessToken(e,t)},Builder:function(e,t){return new u(e,t)},getNewAccessToken:function(){s&&s.getNewAccessToken()},sendEvent:function(e,t){s&&s.sendEvent(e,t)},reset:function(){s=null}}},function(t,n){t.exports=e}])}));
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sumsub/cordova-idensic-mobile-sdk-plugin",
3
- "version": "1.18.2",
3
+ "version": "1.18.4",
4
4
  "description": "Cordova plugin exposing Sumsub SDK",
5
5
  "scripts": {
6
6
  "build": "webpack -p"
@@ -1,5 +1,5 @@
1
1
  <?xml version="1.0" encoding="utf-8" ?>
2
- <plugin id="cordova-idensic-mobile-sdk-plugin" version="1.18.2" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android">
2
+ <plugin id="cordova-idensic-mobile-sdk-plugin" version="1.18.4" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android">
3
3
 
4
4
  <name>cordova-idensic-mobile-sdk-plugin</name>
5
5
  <description>Cordova plugin exposing SumSub Mobile SDK</description>
@@ -20,8 +20,8 @@
20
20
  <feature name="SNSMobileSdkCordovaPlugin">
21
21
  <param name="android-package" value="com.sumsub.msdk.plugins.cordova.SNSMobileSdkCordovaPlugin" />
22
22
  </feature>
23
- <preference name="android-targetSdkVersion" value="29" />
24
- <preference name="android-compileSdkVersion" value="29" />
23
+ <preference name="android-targetSdkVersion" value="30" />
24
+ <preference name="android-compileSdkVersion" value="30" />
25
25
  <preference name="android-buildToolsVersion" value="29.0.3" />
26
26
  </config-file>
27
27
 
@@ -71,7 +71,7 @@
71
71
  <source url="https://cdn.cocoapods.org/"/>
72
72
  </config>
73
73
  <pods>
74
- <pod name="IdensicMobileSDK" spec="=1.18.2" />
74
+ <pod name="IdensicMobileSDK" spec="=1.18.4" />
75
75
  </pods>
76
76
  </podspec>
77
77
 
@@ -1,6 +1,5 @@
1
1
  buildscript {
2
2
  repositories {
3
- maven { url "https://maven.sumsub.com/repository/maven-public/" }
4
3
  google()
5
4
  jcenter()
6
5
  mavenCentral()
@@ -17,6 +16,7 @@ allprojects {
17
16
  }
18
17
 
19
18
  dependencies {
20
- implementation "com.sumsub.sns:idensic-mobile-sdk:1.18.2"
19
+ implementation "com.sumsub.sns:idensic-mobile-sdk:1.18.4"
20
+ implementation "com.sumsub.sns:idensic-mobile-sdk-prooface:1.18.4"
21
21
  implementation 'com.google.android.material:material:1.3.0'
22
22
  }
@@ -47,7 +47,8 @@ android {
47
47
  }
48
48
 
49
49
  dependencies {
50
- implementation "com.sumsub.sns:idensic-mobile-sdk:1.18.2"
50
+ implementation "com.sumsub.sns:idensic-mobile-sdk:1.18.4"
51
+ implementation "com.sumsub.sns:idensic-mobile-sdk-prooface:1.18.4"
51
52
 
52
53
  implementation 'com.google.android.material:material:1.3.0'
53
54
  implementation 'org.apache.cordova:framework:8.1.0'