react-native-mytatva-rn-sdk 1.2.66 → 1.2.67

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.
@@ -489,6 +489,24 @@ RCT_EXPORT_METHOD(reconnectCgmTracky:(NSString *)token envType: (NSString *)env
489
489
  });
490
490
  }
491
491
 
492
+ RCT_REMAP_METHOD(getTrackLibDbPath,
493
+ getTrackLibDbPathWithResolver:(RCTPromiseResolveBlock)resolve
494
+ rejecter:(RCTPromiseRejectBlock)reject)
495
+ {
496
+ @try {
497
+ NSArray<NSURL *> *urls = [[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask];
498
+ NSURL *documentsURL = [urls lastObject];
499
+ NSURL *storeURL = [documentsURL URLByAppendingPathComponent:@"KaiLiTe.sqlite"];
500
+ if (storeURL.path.length > 0) {
501
+ resolve(storeURL.path);
502
+ } else {
503
+ reject(@"ERROR_DB_PATH", @"Failed to construct DB path", nil);
504
+ }
505
+ } @catch (NSException *exception) {
506
+ NSError *error = [NSError errorWithDomain:@"com.mytatvarnsdk" code:500 userInfo:@{NSLocalizedDescriptionKey: exception.reason ?: @"Unknown error"}];
507
+ reject(@"ERROR_DB_PATH", @"Exception while fetching DB path", error);
508
+ }
509
+ }
492
510
 
493
511
  RCT_EXPORT_METHOD(openHelpSupport)
494
512
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-mytatva-rn-sdk",
3
- "version": "1.2.66",
3
+ "version": "1.2.67",
4
4
  "description": "a package to inject data into visit health pwa",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",