react-native-zyprotectabio-module 1.1.13 → 1.1.15

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.
@@ -139,7 +139,7 @@ dependencies {
139
139
  //INICIO_ZY_ZYTRUST
140
140
  implementation 'androidx.appcompat:appcompat:1.4.0'
141
141
  implementation 'com.google.android.material:material:1.5.0'
142
- implementation(group: 'com.zy.multiempresa.android.lib.protecta', name: 'sdk', version: '1.1.14', ext: 'aar'){
142
+ implementation(group: 'com.zy.multiempresa.android.lib.protecta', name: 'sdk', version: '1.1.16', ext: 'aar'){
143
143
  transitive = true
144
144
  }
145
145
 
@@ -62,13 +62,25 @@ RCT_EXPORT_METHOD(onZyBioCapture:(NSDictionary *)opcional
62
62
  }
63
63
 
64
64
  - (NSNumber *)safeNumber:(id)value defaultValue:(NSNumber *)defaultValue {
65
- if (value == nil || value == [NSNull null]) {
66
- return defaultValue;
67
- }
68
- if ([value isKindOfClass:[NSNumber class]]) {
69
- return value;
70
- }
71
- return defaultValue;
65
+
66
+ if (value == nil || value == [NSNull null]) {
67
+ return defaultValue;
68
+ }
69
+
70
+ NSNumber *number = nil;
71
+
72
+ if ([value isKindOfClass:[NSNumber class]]) {
73
+ number = value;
74
+ } else if ([value isKindOfClass:[NSString class]]) {
75
+ NSNumberFormatter *formatter = [[NSNumberFormatter alloc] init];
76
+ number = [formatter numberFromString:value];
77
+ }
78
+
79
+ if (number == nil || [number integerValue] == 0) {
80
+ return defaultValue;
81
+ }
82
+
83
+ return number;
72
84
  }
73
85
 
74
86
  @end
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-zyprotectabio-module",
3
- "version": "1.1.13",
3
+ "version": "1.1.15",
4
4
  "description": "React Native native module for ZyProtecta biometric integration",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -14,6 +14,6 @@ Pod::Spec.new do |s|
14
14
  s.source = { :git => "https://github.com/ZY-PROTECTA/react-native-zyprotectabio-module.git", :tag => "#{s.version}" }
15
15
  s.source_files = "ios/**/*.{h,m,mm,swift}"
16
16
 
17
- s.dependency 'zy_multicompany_bio_lib_ios_protecta', '1.0.7'
17
+ s.dependency 'zy_multicompany_bio_lib_ios_protecta', '1.0.9'
18
18
  s.dependency "React-Core"
19
19
  end