marinofaggiana 4 жил өмнө
parent
commit
89cb6fbe25

+ 3 - 1
iOSClient/AppDelegate.m

@@ -69,7 +69,9 @@
     [[NCCommunicationCommon shared] setupWithUserAgent:[CCUtility getUserAgent] capabilitiesGroup:[NCBrandOptions sharedInstance].capabilitiesGroups];
     NSInteger logLevel = [CCUtility getLogLevel];
     [[NCCommunicationCommon shared] setFileLogWithLevel:logLevel echo:true];
-    [[NCCommunicationCommon shared] writeLog:[NSString stringWithFormat:@"%@ %lu", @"[LOG] Start session with level", (unsigned long)logLevel]];
+    NSString *versionApp = [NSString stringWithFormat:@"%@.%@", [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"], [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"]];
+    NSString *versionNextcloudiOS = [NSString stringWithFormat:[NCBrandOptions sharedInstance].textCopyrightNextcloudiOS, versionApp];
+    [[NCCommunicationCommon shared] writeLog:[NSString stringWithFormat:@"%@ %lu %@", @"[LOG] Start session with level", (unsigned long)logLevel, versionNextcloudiOS]];
     
     // Set account, if no exists clear all
     tableAccount *tableAccount = [[NCManageDatabase sharedInstance] getAccountActive];

+ 4 - 1
iOSClient/Settings/CCAdvanced.m

@@ -163,7 +163,10 @@
 
             [[NCCommunicationCommon shared] clearFileLog];
             NSInteger logLevel = [CCUtility getLogLevel];
-            [[NCCommunicationCommon shared] writeLog:[NSString stringWithFormat:@"%@ %lu", @"[LOG] Start session with level", (unsigned long)logLevel]];
+            
+            NSString *versionApp = [NSString stringWithFormat:@"%@.%@", [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"], [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"]];
+            NSString *versionNextcloudiOS = [NSString stringWithFormat:[NCBrandOptions sharedInstance].textCopyrightNextcloudiOS, versionApp];
+            [[NCCommunicationCommon shared] writeLog:[NSString stringWithFormat:@"%@ %lu %@", @"[LOG] Clear log with level", (unsigned long)logLevel, versionNextcloudiOS]];
         };
         [section addFormRow:row];