@identomat-inc/react-native-identomat 1.0.21 → 1.0.22
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/README.md +1 -4
- package/index.js +4 -13
- package/ios/Identomat.m +3 -2
- package/ios/Identomat.swift +19 -69
- package/package.json +1 -1
- package/react-native-identomat.podspec +1 -18
- package/ios/Frameworks/identomat.framework/Assets.car +0 -0
- package/ios/Frameworks/identomat.framework/Headers/identomat-Swift.h +0 -638
- package/ios/Frameworks/identomat.framework/Headers/identomat.h +0 -18
- package/ios/Frameworks/identomat.framework/Info.plist +0 -0
- package/ios/Frameworks/identomat.framework/Modules/identomat.swiftmodule/Project/arm.swiftsourceinfo +0 -0
- package/ios/Frameworks/identomat.framework/Modules/identomat.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo +0 -0
- package/ios/Frameworks/identomat.framework/Modules/identomat.swiftmodule/Project/arm64.swiftsourceinfo +0 -0
- package/ios/Frameworks/identomat.framework/Modules/identomat.swiftmodule/Project/armv7-apple-ios.swiftsourceinfo +0 -0
- package/ios/Frameworks/identomat.framework/Modules/identomat.swiftmodule/Project/armv7.swiftsourceinfo +0 -0
- package/ios/Frameworks/identomat.framework/Modules/identomat.swiftmodule/arm.swiftdoc +0 -0
- package/ios/Frameworks/identomat.framework/Modules/identomat.swiftmodule/arm.swiftinterface +0 -1866
- package/ios/Frameworks/identomat.framework/Modules/identomat.swiftmodule/arm.swiftmodule +0 -0
- package/ios/Frameworks/identomat.framework/Modules/identomat.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/ios/Frameworks/identomat.framework/Modules/identomat.swiftmodule/arm64-apple-ios.swiftinterface +0 -1947
- package/ios/Frameworks/identomat.framework/Modules/identomat.swiftmodule/arm64-apple-ios.swiftmodule +0 -0
- package/ios/Frameworks/identomat.framework/Modules/identomat.swiftmodule/arm64.swiftdoc +0 -0
- package/ios/Frameworks/identomat.framework/Modules/identomat.swiftmodule/arm64.swiftinterface +0 -1947
- package/ios/Frameworks/identomat.framework/Modules/identomat.swiftmodule/arm64.swiftmodule +0 -0
- package/ios/Frameworks/identomat.framework/Modules/identomat.swiftmodule/armv7-apple-ios.swiftdoc +0 -0
- package/ios/Frameworks/identomat.framework/Modules/identomat.swiftmodule/armv7-apple-ios.swiftinterface +0 -1866
- package/ios/Frameworks/identomat.framework/Modules/identomat.swiftmodule/armv7-apple-ios.swiftmodule +0 -0
- package/ios/Frameworks/identomat.framework/Modules/identomat.swiftmodule/armv7.swiftdoc +0 -0
- package/ios/Frameworks/identomat.framework/Modules/identomat.swiftmodule/armv7.swiftinterface +0 -1866
- package/ios/Frameworks/identomat.framework/Modules/identomat.swiftmodule/armv7.swiftmodule +0 -0
- package/ios/Frameworks/identomat.framework/Modules/identomat.swiftmodule/x86_64.swiftdoc +0 -0
- package/ios/Frameworks/identomat.framework/Modules/identomat.swiftmodule/x86_64.swiftinterface +0 -1947
- package/ios/Frameworks/identomat.framework/Modules/identomat.swiftmodule/x86_64.swiftmodule +0 -0
- package/ios/Frameworks/identomat.framework/Modules/module.modulemap +0 -11
- package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/3Qb-Zw-Ydv-view-5fQ-xy-n01.nib/objects-11.0+.nib +0 -0
- package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/3Qb-Zw-Ydv-view-5fQ-xy-n01.nib/runtime.nib +0 -0
- package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/Ajy-Ix-fe9-view-G1g-ks-BqP.nib/objects-11.0+.nib +0 -0
- package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/Ajy-Ix-fe9-view-G1g-ks-BqP.nib/runtime.nib +0 -0
- package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/Info.plist +0 -0
- package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/RiD-hj-AH5-view-oaZ-g7-pTv.nib/objects-11.0+.nib +0 -0
- package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/RiD-hj-AH5-view-oaZ-g7-pTv.nib/runtime.nib +0 -0
- package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/VAA-Ss-lbh-view-UDO-8x-V4i.nib/objects-11.0+.nib +0 -0
- package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/VAA-Ss-lbh-view-UDO-8x-V4i.nib/runtime.nib +0 -0
- package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/YyM-f0-UbG-view-INz-ta-t1c.nib/objects-11.0+.nib +0 -0
- package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/YyM-f0-UbG-view-INz-ta-t1c.nib/runtime.nib +0 -0
- package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/agreement_view.nib/objects-11.0+.nib +0 -0
- package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/agreement_view.nib/runtime.nib +0 -0
- package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/default_view_controller.nib/objects-11.0+.nib +0 -0
- package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/default_view_controller.nib/runtime.nib +0 -0
- package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/document_types_view.nib/objects-11.0+.nib +0 -0
- package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/document_types_view.nib/runtime.nib +0 -0
- package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/fQF-H1-pI2-view-oqs-SO-IYK.nib/objects-11.0+.nib +0 -0
- package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/fQF-H1-pI2-view-oqs-SO-IYK.nib/runtime.nib +0 -0
- package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/liveness_view.nib/objects-11.0+.nib +0 -0
- package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/liveness_view.nib/runtime.nib +0 -0
- package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/match_photo_view.nib/objects-11.0+.nib +0 -0
- package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/match_photo_view.nib/runtime.nib +0 -0
- package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/qkz-dS-cJe-view-KRp-Px-e4R.nib/objects-11.0+.nib +0 -0
- package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/qkz-dS-cJe-view-KRp-Px-e4R.nib/runtime.nib +0 -0
- package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/scan_document_view.nib/objects-11.0+.nib +0 -0
- package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/scan_document_view.nib/runtime.nib +0 -0
- package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/upload_file_view.nib/objects-11.0+.nib +0 -0
- package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/upload_file_view.nib/runtime.nib +0 -0
- package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/upload_types_view.nib/objects-11.0+.nib +0 -0
- package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/upload_types_view.nib/runtime.nib +0 -0
- package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/vTZ-J7-KVA-view-nnL-sn-lBz.nib/objects-11.0+.nib +0 -0
- package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/vTZ-J7-KVA-view-nnL-sn-lBz.nib/runtime.nib +0 -0
- package/ios/Frameworks/identomat.framework/_CodeSignature/CodeResources +0 -1045
- package/ios/Frameworks/identomat.framework/en.lproj/languages.strings +0 -0
- package/ios/Frameworks/identomat.framework/es.lproj/languages.strings +0 -0
- package/ios/Frameworks/identomat.framework/identomat +0 -0
- package/ios/Frameworks/identomat.framework/ka.lproj/languages.strings +0 -0
- package/ios/Frameworks/identomat.framework/ru.lproj/languages.strings +0 -0
package/README.md
CHANGED
|
@@ -7,9 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
#### iOS
|
|
10
|
-
|
|
11
|
-
1. If you don't use swift, you need create empty swift file with bridging header in you ios project
|
|
12
|
-
2. run pod install in you ios project
|
|
10
|
+
1. run pod install in you ios directory
|
|
13
11
|
|
|
14
12
|
#### Android
|
|
15
13
|
|
|
@@ -34,7 +32,6 @@
|
|
|
34
32
|
class Callback {
|
|
35
33
|
callback() {
|
|
36
34
|
console.log('finished')
|
|
37
|
-
|
|
38
35
|
}
|
|
39
36
|
}
|
|
40
37
|
identomat.setCallBack(new Callback())
|
package/index.js
CHANGED
|
@@ -12,31 +12,22 @@ class Identomat {
|
|
|
12
12
|
if(Platform.OS == "android"){
|
|
13
13
|
NativeModules.BridgeModule.setBaseUrl(baseUrl);
|
|
14
14
|
}else if(Platform.OS == "ios"){
|
|
15
|
-
NativeModules.Identomat.
|
|
16
|
-
sessionKey,
|
|
17
|
-
);
|
|
15
|
+
NativeModules.Identomat.setBaseUrl(baseUrl);
|
|
18
16
|
}
|
|
19
17
|
}
|
|
20
|
-
|
|
21
18
|
async start(sessionKey) {
|
|
22
19
|
if(Platform.OS == "android"){
|
|
23
20
|
NativeModules.BridgeModule.start(sessionKey);
|
|
24
21
|
}else if(Platform.OS == "ios"){
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
NativeModules.Identomat.start(JSON.stringify(identomatConfig),
|
|
29
|
-
sessionKey,
|
|
30
|
-
);
|
|
22
|
+
NativeModules.Identomat.start(sessionKey);
|
|
31
23
|
}
|
|
32
24
|
}
|
|
33
|
-
|
|
34
25
|
setCallback(Callback){
|
|
35
26
|
if (Platform.OS=="android"){
|
|
36
27
|
BatchedBridge.registerCallableModule('JavaScriptVisibleToJava', Callback);
|
|
37
28
|
}else if(Platform.OS=="ios"){
|
|
38
|
-
NativeModules.Identomat.
|
|
39
|
-
|
|
29
|
+
NativeModules.Identomat.callback(function(error,data){
|
|
30
|
+
Callback.callback()
|
|
40
31
|
})
|
|
41
32
|
}
|
|
42
33
|
}
|
package/ios/Identomat.m
CHANGED
|
@@ -19,8 +19,9 @@
|
|
|
19
19
|
#import <React/RCTBridgeModule.h>
|
|
20
20
|
|
|
21
21
|
@interface RCT_EXTERN_MODULE(Identomat, NSObject)
|
|
22
|
-
RCT_EXTERN_METHOD(start:
|
|
23
|
-
RCT_EXTERN_METHOD(
|
|
22
|
+
RCT_EXTERN_METHOD(start: (NSString *)sessionId)
|
|
23
|
+
RCT_EXTERN_METHOD(setBaseUrl: (NSString *)baseUrl)
|
|
24
|
+
RCT_EXTERN_METHOD(callback: (RCTResponseSenderBlock *)successCallback)
|
|
24
25
|
@end
|
|
25
26
|
|
|
26
27
|
|
package/ios/Identomat.swift
CHANGED
|
@@ -13,46 +13,23 @@ import identomat
|
|
|
13
13
|
@objc(Identomat)
|
|
14
14
|
|
|
15
15
|
class Identomat: NSObject, RCTBridgeModule{
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
16
|
+
|
|
17
|
+
static func moduleName() -> String!{
|
|
18
|
+
return "Identomat";
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
static func requirement () -> Bool {
|
|
22
|
+
return true;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
25
|
var successCallback: RCTResponseSenderBlock? = nil;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
func start(_
|
|
26
|
+
|
|
27
|
+
@objc
|
|
28
|
+
func start(_ sessionId : String) -> Void {
|
|
29
29
|
DispatchQueue.main.async {
|
|
30
30
|
|
|
31
31
|
let topController = UIApplication.topViewController()
|
|
32
|
-
|
|
33
|
-
let json = (try? JSONSerialization.jsonObject(with: data!, options: [])) as! [String:Any]
|
|
34
|
-
|
|
35
|
-
let flags = json["flags"] as! [String : Any]
|
|
36
|
-
let documentTypes = self.parseDocuments(documentTypes: json["docTypes"] as! [String:Any])
|
|
37
|
-
|
|
38
|
-
IdentomatManager.getInstance().setUp(token: sessionId, flags: flags, documentTypes: documentTypes)
|
|
39
|
-
if let color = json["colors"] as? [String : String]{
|
|
40
|
-
IdentomatManager.getInstance().setColors(color: color)
|
|
41
|
-
}
|
|
42
|
-
if let strings = json["strings"] as? [String : Any?]{
|
|
43
|
-
IdentomatManager.getInstance().setStrings(dict: strings)
|
|
44
|
-
}
|
|
45
|
-
if let fonts = json["fonts"] as? [String : Any?]{
|
|
46
|
-
if let head1 = fonts["Head1Font"] as? String{
|
|
47
|
-
IdentomatManager.getInstance().setHead1Font(fontname: head1)
|
|
48
|
-
}
|
|
49
|
-
if let head2 = fonts["Head2Font"] as? String{
|
|
50
|
-
IdentomatManager.getInstance().setHead2Font(fontname: head2)
|
|
51
|
-
}
|
|
52
|
-
if let body = fonts["BodyFont"] as? String{
|
|
53
|
-
IdentomatManager.getInstance().setBodyFont(fontname: body)
|
|
54
|
-
}
|
|
55
|
-
}
|
|
32
|
+
IdentomatManager.getInstance().setUp(token: sessionId)
|
|
56
33
|
//start identomat
|
|
57
34
|
let identomatView = IdentomatManager.getInstance().getIdentomatView()
|
|
58
35
|
identomatView.modalPresentationStyle = .fullScreen
|
|
@@ -61,7 +38,11 @@ class Identomat: NSObject, RCTBridgeModule{
|
|
|
61
38
|
}
|
|
62
39
|
}
|
|
63
40
|
@objc
|
|
64
|
-
func
|
|
41
|
+
func setBaseUrl(_ baseUrl : String) -> Void {
|
|
42
|
+
IdentomatManager.getInstance().setBaseUrl(url: baseUrl)
|
|
43
|
+
}
|
|
44
|
+
@objc
|
|
45
|
+
func callback(_ successCallback: @escaping RCTResponseSenderBlock){
|
|
65
46
|
self.successCallback = successCallback;
|
|
66
47
|
IdentomatManager.getInstance().callBack {
|
|
67
48
|
print("process is done we are good")
|
|
@@ -69,39 +50,8 @@ class Identomat: NSObject, RCTBridgeModule{
|
|
|
69
50
|
}
|
|
70
51
|
|
|
71
52
|
}
|
|
72
|
-
|
|
73
|
-
func parseDocuments(documentTypes : [String:Any]) -> [Int]{
|
|
74
|
-
var docTypes : [Int] = []
|
|
75
|
-
if let documentCard = documentTypes["id_card"] as? Bool{
|
|
76
|
-
if(documentCard){
|
|
77
|
-
docTypes.append(Document.CARD)
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
if let documentPassport = documentTypes["passport"] as? Bool{
|
|
81
|
-
if(documentPassport){
|
|
82
|
-
docTypes.append(Document.PASSPORT)
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
if let documentLicense = documentTypes["driving_license"] as? Bool{
|
|
86
|
-
if(documentLicense){
|
|
87
|
-
docTypes.append(Document.LICENSE)
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
if let documentResidence = documentTypes["residence_permit"] as? Bool{
|
|
91
|
-
if(documentResidence){
|
|
92
|
-
docTypes.append(Document.RESIDENCE)
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
return docTypes
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
}
|
|
99
|
-
class Document {
|
|
100
|
-
public static let CARD : Int = 0
|
|
101
|
-
public static let LICENSE : Int = 1
|
|
102
|
-
public static let RESIDENCE : Int = 2
|
|
103
|
-
public static let PASSPORT : Int = 3
|
|
104
53
|
}
|
|
54
|
+
|
|
105
55
|
|
|
106
56
|
|
|
107
57
|
extension UIApplication {
|
package/package.json
CHANGED
|
@@ -21,24 +21,7 @@ Pod::Spec.new do |s|
|
|
|
21
21
|
s.source_files = "ios/**/*.{h,c,m,swift}"
|
|
22
22
|
s.swift_version = "5"
|
|
23
23
|
s.requires_arc = true
|
|
24
|
-
|
|
25
|
-
#.dependency = 'Frameworks/identomat.framework'
|
|
26
|
-
|
|
27
|
-
s.vendored_frameworks = 'ios/Frameworks/identomat.framework'
|
|
28
|
-
s.preserve_path = 'ios/Frameworks/'
|
|
29
24
|
s.dependency "React"
|
|
30
|
-
|
|
31
|
-
# s.subspec 'identomat' do |df|
|
|
32
|
-
# df.source_files = "Frameworks/**/*.swift"
|
|
33
|
-
# end
|
|
34
|
-
|
|
35
|
-
# s.subspec 'Core' do |core|
|
|
36
|
-
# core.source_files = "Core/**/*.swift"
|
|
37
|
-
# core.dependency 'Core/DependencyFramework'
|
|
38
|
-
# end
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
# .
|
|
42
|
-
# s.dependency "..."
|
|
25
|
+
s.dependency "identomat-inc"
|
|
43
26
|
end
|
|
44
27
|
|
|
Binary file
|