@veriff/react-native-sdk 2.3.2 → 2.5.2

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.
@@ -78,7 +78,7 @@ repositories {
78
78
  dependencies {
79
79
  //noinspection GradleDynamicVersion
80
80
  implementation 'com.facebook.react:react-native:+' // From node_modules
81
- implementation 'com.veriff:veriff-library:3.+'
81
+ implementation 'com.veriff:veriff-library:3.23.+'
82
82
  }
83
83
 
84
84
  def configureReactNativePom(def pom) {
@@ -90,12 +90,12 @@ def configureReactNativePom(def pom) {
90
90
  version = packageJson.version
91
91
  group = "com.reactlibrary"
92
92
  description packageJson.description
93
- url packageJson.repository.baseUrl
93
+ url = "https://github.com/veriff/react-native-sdk"
94
94
 
95
95
  licenses {
96
96
  license {
97
97
  name packageJson.license
98
- url packageJson.repository.baseUrl + '/blob/master/' + packageJson.licenseFilename
98
+ url "https://github.com/veriff/react-native-sdk" + '/blob/master/' + packageJson.licenseFilename
99
99
  distribution 'repo'
100
100
  }
101
101
  }
@@ -83,6 +83,7 @@ public class VeriffSdkModule extends ReactContextBaseJavaModule {
83
83
  public static final String KEY_STATUS_BAR_COLOR = "statusBarColor";
84
84
  public static final String KEY_PRIMARY_TEXT_COLOR = "primaryTextColor";
85
85
  public static final String KEY_SECONDARY_TEXT_COLOR = "secondaryTextColor";
86
+ public static final String KEY_PRIMARY_BUTTON_BACKGROUND_COLOR = "primaryButtonBackgroundColor";
86
87
  public static final String KEY_BUTTON_CORNER_RADIUS = "buttonCornerRadius";
87
88
  private static final String KEY_CUSTOM_INTRO_SCREEN = "customIntroScreen";
88
89
  private static final String KEY_RN_IMAGE_URI = "uri";
@@ -250,6 +251,9 @@ public class VeriffSdkModule extends ReactContextBaseJavaModule {
250
251
  if (brandConfig.hasKey(KEY_SECONDARY_TEXT_COLOR)) {
251
252
  branding.secondaryTextColor(parseColor(brandConfig.getString(KEY_SECONDARY_TEXT_COLOR)));
252
253
  }
254
+ if (brandConfig.hasKey(KEY_PRIMARY_BUTTON_BACKGROUND_COLOR)) {
255
+ branding.primaryButtonBackgroundColor(parseColor(brandConfig.getString(KEY_PRIMARY_BUTTON_BACKGROUND_COLOR)));
256
+ }
253
257
  if (brandConfig.hasKey(KEY_BUTTON_CORNER_RADIUS)) {
254
258
  branding.buttonCornerRadius((float)brandConfig.getDouble(KEY_BUTTON_CORNER_RADIUS));
255
259
  }
package/ios/VeriffSdk.m CHANGED
@@ -1,6 +1,6 @@
1
1
  #import <React/RCTBridgeModule.h>
2
2
 
3
- @interface RCT_EXTERN_MODULE(VeriffSdk, NSObject)
3
+ @interface RCT_EXTERN_REMAP_MODULE(VeriffSdk, VeriffSdkReactWrapper, NSObject)
4
4
 
5
5
  RCT_EXTERN_METHOD(launchVeriff:(NSDictionary *)configuration resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject)
6
6
 
@@ -2,7 +2,7 @@ import Foundation
2
2
  import Veriff
3
3
  import UIKit
4
4
 
5
- @objc(VeriffSdk)
5
+ @objc(VeriffSdkReactWrapper)
6
6
  class VeriffSdk: NSObject {
7
7
  /**
8
8
  * Indicates that the parameters passed to |launchVeriff([String: AnyObject]], RCTPromiseResolveBlock,RCTPromiseRejectBlock| were invalid.
@@ -34,6 +34,7 @@ class VeriffSdk: NSObject {
34
34
  private static let STATUS_BAR_COLOR = "statusBarColor"
35
35
  private static let PRIMARY_TEXT_COLOR = "primaryTextColor"
36
36
  private static let SECONDARY_TEXT_COLOR = "secondaryTextColor"
37
+ private static let PRIMARY_BUTTON_BACKGROUND_COLOR = "primaryButtonBackgroundColor"
37
38
  private static let BUTTON_CORNER_RADIUS = "buttonCornerRadius"
38
39
  private static let USE_CUSTOM_INTRO_SCREEN = "customIntroScreen"
39
40
 
@@ -94,6 +95,7 @@ class VeriffSdk: NSObject {
94
95
  branding?.statusBarColor = (brandingConfig[VeriffSdk.STATUS_BAR_COLOR] as? String).map { VeriffSdk.parseColor(hexcolor: $0) }
95
96
  branding?.primaryTextColor = (brandingConfig[VeriffSdk.PRIMARY_TEXT_COLOR] as? String).map { VeriffSdk.parseColor(hexcolor: $0) }
96
97
  branding?.secondaryTextColor = (brandingConfig[VeriffSdk.SECONDARY_TEXT_COLOR] as? String).map { VeriffSdk.parseColor(hexcolor: $0) }
98
+ branding?.primaryButtonBackgroundColor = (brandingConfig[VeriffSdk.PRIMARY_BUTTON_BACKGROUND_COLOR] as? String).map { VeriffSdk.parseColor(hexcolor: $0) }
97
99
  branding?.buttonCornerRadius = (brandingConfig[VeriffSdk.BUTTON_CORNER_RADIUS] as? Double).map { CGFloat($0) }
98
100
  }
99
101
 
@@ -126,6 +128,7 @@ class VeriffSdk: NSObject {
126
128
 
127
129
  let veriff = Veriff.VeriffSdk.shared
128
130
  veriff.delegate = self
131
+ veriff.implementationType = .reactNative
129
132
  veriffConfiguration?.queryItems = VeriffSdk.updateConfigWithQueryItems(urlString: sessionUrl!)
130
133
  veriff.startAuthentication(sessionUrl: sessionUrl!, configuration: veriffConfiguration)
131
134
  }
package/package.json CHANGED
@@ -1,17 +1,13 @@
1
1
  {
2
2
  "name": "@veriff/react-native-sdk",
3
- "title": "React Native Veriff Sdk",
4
- "version": "2.3.2",
3
+ "title": "React Native Veriff SDK",
4
+ "version": "2.5.2",
5
5
  "description": "React Native SDK for Veriff identity verification",
6
6
  "main": "index.js",
7
7
  "scripts": {
8
8
  "lint": "eslint ."
9
9
  },
10
- "repository": {
11
- "type": "git",
12
- "url": "git+https://github.com/veriff/react-native-sdk.git",
13
- "baseUrl": "https://github.com/veriff/react-native-sdk"
14
- },
10
+ "homepage": "https://developers.veriff.com/#react-native-sdk-integration",
15
11
  "keywords": [
16
12
  "react-native",
17
13
  "veriff",
@@ -20,5 +20,5 @@ Pod::Spec.new do |s|
20
20
  s.requires_arc = true
21
21
 
22
22
  s.dependency "React"
23
- s.dependency "VeriffSDK", "~>4.3"
23
+ s.dependency "VeriffSDK", ">= 4.18.0"
24
24
  end