@identomat-inc/react-native-identomat 1.0.24 → 1.0.26
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 +2 -1
- package/android/build.gradle +1 -1
- package/index.js +2 -2
- package/ios/Identomat.m +2 -0
- package/ios/Identomat.swift +13 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -35,9 +35,10 @@
|
|
|
35
35
|
}
|
|
36
36
|
identomat.setCallback(new Callback())
|
|
37
37
|
identomat.setBaseUrl(config.baseUrl);
|
|
38
|
-
identomat.start(config.sessionKey);
|
|
39
38
|
identomat.setColors(config.colors);
|
|
40
39
|
identomat.setStrings(config.strings);
|
|
40
|
+
identomat.start(config.sessionKey);
|
|
41
|
+
|
|
41
42
|
|
|
42
43
|
```
|
|
43
44
|
## config
|
package/android/build.gradle
CHANGED
|
@@ -43,6 +43,6 @@ dependencies {
|
|
|
43
43
|
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
|
44
44
|
// implementation 'com.android.support:recyclerview-v7:28.0.0'
|
|
45
45
|
implementation 'com.android.support:design:28.0.0'
|
|
46
|
-
implementation 'com.identomat:identomat-sdk:1.1.
|
|
46
|
+
implementation 'com.identomat:identomat-sdk:1.1.65'
|
|
47
47
|
implementation 'androidx.fragment:fragment:1.1.0-alpha05'
|
|
48
48
|
}
|
package/index.js
CHANGED
|
@@ -19,14 +19,14 @@ class Identomat {
|
|
|
19
19
|
if(Platform.OS == "android"){
|
|
20
20
|
NativeModules.BridgeModule.setColors(JSON.stringify(colors));
|
|
21
21
|
}else if(Platform.OS == "ios"){
|
|
22
|
-
|
|
22
|
+
NativeModules.Identomat.setColors(JSON.stringify(colors));
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
async setStrings(strings) {
|
|
26
26
|
if(Platform.OS == "android"){
|
|
27
27
|
NativeModules.BridgeModule.setStrings(JSON.stringify(strings));
|
|
28
28
|
}else if(Platform.OS == "ios"){
|
|
29
|
-
|
|
29
|
+
NativeModules.Identomat.setStrings(JSON.stringify(strings));
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
async start(sessionKey) {
|
package/ios/Identomat.m
CHANGED
|
@@ -21,6 +21,8 @@
|
|
|
21
21
|
@interface RCT_EXTERN_MODULE(Identomat, NSObject)
|
|
22
22
|
RCT_EXTERN_METHOD(start: (NSString *)sessionId)
|
|
23
23
|
RCT_EXTERN_METHOD(setBaseUrl: (NSString *)baseUrl)
|
|
24
|
+
RCT_EXTERN_METHOD(setColors: (NSString *)colors)
|
|
25
|
+
RCT_EXTERN_METHOD(setStrings: (NSString *)strings)
|
|
24
26
|
RCT_EXTERN_METHOD(callback: (RCTResponseSenderBlock *)successCallback)
|
|
25
27
|
@end
|
|
26
28
|
|
package/ios/Identomat.swift
CHANGED
|
@@ -42,10 +42,22 @@ class Identomat: NSObject, RCTBridgeModule{
|
|
|
42
42
|
IdentomatManager.getInstance().setBaseUrl(url: baseUrl)
|
|
43
43
|
}
|
|
44
44
|
@objc
|
|
45
|
+
func setColors(_ colors : String) -> Void {
|
|
46
|
+
let data: Data? = colors.data(using: .utf8)
|
|
47
|
+
let colorsObj = (try? JSONSerialization.jsonObject(with: data!, options: [])) as! [String:String]
|
|
48
|
+
IdentomatManager.getInstance().setColors(color: colorsObj)
|
|
49
|
+
}
|
|
50
|
+
@objc
|
|
51
|
+
func setStrings(_ strings : String) -> Void {
|
|
52
|
+
let data: Data? = strings.data(using: .utf8)
|
|
53
|
+
let stringsObj = (try? JSONSerialization.jsonObject(with: data!, options: [])) as! [String:Any]
|
|
54
|
+
IdentomatManager.getInstance().setStrings(dict: stringsObj)
|
|
55
|
+
// IdentomatManager.getInstance().setStrings(url: baseUrl)
|
|
56
|
+
}
|
|
57
|
+
@objc
|
|
45
58
|
func callback(_ successCallback: @escaping RCTResponseSenderBlock){
|
|
46
59
|
self.successCallback = successCallback;
|
|
47
60
|
IdentomatManager.getInstance().callBack {
|
|
48
|
-
print("process is done we are good")
|
|
49
61
|
self.successCallback!([NSNull(),"done"])
|
|
50
62
|
}
|
|
51
63
|
|