Ver Fonte

Add copy DB on Documents for DEBUG mode

Marino Faggiana há 7 anos atrás
pai
commit
e9fe5d17f2
1 ficheiros alterados com 6 adições e 0 exclusões
  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;