Procházet zdrojové kódy

Add copy DB on Documents for DEBUG mode

Marino Faggiana před 7 roky
rodič
revize
e9fe5d17f2
1 změnil soubory, kde provedl 6 přidání a 0 odebrání
  1. 6 0
      iOSClient/AppDelegate.m

+ 6 - 0
iOSClient/AppDelegate.m

@@ -147,6 +147,12 @@
         }
     }
     
+#ifdef DEBUG
+    NSString *atPathDB = [NSString stringWithFormat:@"%@/nextcloud.realm", [[dirGroup URLByAppendingPathComponent:appDatabaseNextcloud] path]];
+    NSString *toPathDB = [NSString stringWithFormat:@"%@/nextcloud.realm", [CCUtility getDirectoryLocal]];
+    [[NSFileManager defaultManager] copyItemAtPath:atPathDB toPath:toPathDB error:nil];
+#endif
+    
     // Operation Queue OC Networking
     _netQueue = [[NSOperationQueue alloc] init];
     _netQueue.name = k_queue;