react-native-mytatva-rn-sdk 1.2.74 → 1.2.76
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.
|
@@ -57,11 +57,9 @@
|
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
// Create the coordinator and store
|
|
60
|
-
|
|
61
60
|
_persistentStoreCoordinator = [[NSPersistentStoreCoordinator alloc] initWithManagedObjectModel:[self managedObjectModel]];
|
|
62
61
|
NSURL *storeURL = [[self applicationDocumentsDirectory] URLByAppendingPathComponent:@"KaiLiTe.sqlite"];
|
|
63
62
|
NSError *error = nil;
|
|
64
|
-
_persistentStoreCoordinator = [[NSPersistentStoreCoordinator alloc] initWithManagedObjectModel:[self managedObjectModel]];
|
|
65
63
|
NSDictionary *optionsDictionary = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithBool:YES],
|
|
66
64
|
NSMigratePersistentStoresAutomaticallyOption, [NSNumber numberWithBool:YES],
|
|
67
65
|
NSInferMappingModelAutomaticallyOption, nil];
|
|
@@ -534,16 +534,18 @@ RCT_EXPORT_METHOD(openHelpSupport)
|
|
|
534
534
|
|
|
535
535
|
RCT_EXPORT_METHOD(observeAllGlucoseData:(NSString *)token isForClearData:(BOOL)isForClearData envType:(NSString *)envType)
|
|
536
536
|
{
|
|
537
|
-
if (isForClearData == YES) {
|
|
538
|
-
[[KLTDatabaseHandler shared].appDelegate deleteAllCoreData];
|
|
539
|
-
}
|
|
540
|
-
|
|
541
537
|
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
|
|
542
538
|
[defaults setObject:token forKey:@"authToken"];
|
|
543
539
|
[defaults setObject:envType forKey:@"envType"];
|
|
544
540
|
[defaults synchronize];
|
|
545
541
|
|
|
542
|
+
// CRITICAL: CoreData context is NSMainQueueConcurrencyType, so ALL CoreData operations
|
|
543
|
+
// must happen on the main thread. React Native native modules are often called from
|
|
544
|
+
// background threads, so we must dispatch to main queue.
|
|
546
545
|
dispatch_async(dispatch_get_main_queue(), ^{
|
|
546
|
+
if (isForClearData == YES) {
|
|
547
|
+
[[KLTDatabaseHandler shared].appDelegate deleteAllCoreData];
|
|
548
|
+
}
|
|
547
549
|
UIWindow *keyWindow = [UIApplication sharedApplication].delegate.window;
|
|
548
550
|
UIViewController *rootVC = keyWindow.rootViewController;
|
|
549
551
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-mytatva-rn-sdk",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.76",
|
|
4
4
|
"description": "a package to inject data into visit health pwa",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
|
@@ -182,7 +182,7 @@
|
|
|
182
182
|
"@react-navigation/stack": "^6.3.18",
|
|
183
183
|
"@reduxjs/toolkit": "^2.6.1",
|
|
184
184
|
"@types/crypto-js": "^4.1.1",
|
|
185
|
-
"axios": "
|
|
185
|
+
"axios": "1.5.0",
|
|
186
186
|
"crypto-js": "^3.1.9-1",
|
|
187
187
|
"moment": "^2.29.4",
|
|
188
188
|
"react-native-actions-sheet": "^0.9.0-alpha.24",
|