marinofaggiana 4 år sedan
förälder
incheckning
b176d15e4a

+ 5 - 5
iOSClient/AutoUpload/NCAutoUpload.m

@@ -137,13 +137,13 @@
     
     if ([CLLocationManager locationServicesEnabled]) {
         
-        [[NCCommunicationCommon shared] writeLog:[NSString stringWithFormat:@"[LOG] checkIfLocationIsEnabled : authorizationStatus: %d", [CLLocationManager authorizationStatus]]];
+        [[NCCommunicationCommon shared] writeLog:[NSString stringWithFormat:@"[LOG] Check if location is enabled: authorizationStatus: %d", [CLLocationManager authorizationStatus]]];
         
         if ([CLLocationManager authorizationStatus] != kCLAuthorizationStatusAuthorizedAlways) {
             
             if ([CLLocationManager authorizationStatus] == kCLAuthorizationStatusNotDetermined ) {
                 
-                [[NCCommunicationCommon shared] writeLog:@"[LOG] checkIfLocationIsEnabled : Location services not determined"];
+                [[NCCommunicationCommon shared] writeLog:@"[LOG] Check if location is enabled: Location services not determined"];
                 [[CCManageLocation sharedInstance] startSignificantChangeUpdates];
                 
             } else {
@@ -295,7 +295,7 @@
             //check location
             if ([CLLocationManager authorizationStatus] == kCLAuthorizationStatusAuthorizedAlways) {
                 
-                [[NCCommunicationCommon shared] writeLog:@"[LOG] Changed Location call uploadNewAssets"];
+                [[NCCommunicationCommon shared] writeLog:@"[LOG] Changed Location call upload new assets"];
                 [self uploadNewAssets];
             }
             
@@ -351,12 +351,12 @@
     // News Assets ? if no verify if blocked Table Auto Upload -> Autostart
     if (newAssetToUpload == nil || [newAssetToUpload count] == 0) {
         
-        [[NCCommunicationCommon shared] writeLog:@"[LOG] Auto upload, no new asset found"];
+        [[NCCommunicationCommon shared] writeLog:@"[LOG] Auto upload, no new assets found"];
         return;
         
     } else {
         
-        [[NCCommunicationCommon shared] writeLog:[NSString stringWithFormat:@"[LOG] Auto upload, new %lu asset found", (unsigned long)[newAssetToUpload count]]];
+        [[NCCommunicationCommon shared] writeLog:[NSString stringWithFormat:@"[LOG] Auto upload, new %lu assets found", (unsigned long)[newAssetToUpload count]]];
     }
     
     dispatch_async(dispatch_get_main_queue(), ^{

+ 3 - 2
iOSClient/ManageLocation+ManageAsset/CCManageLocation.m

@@ -23,6 +23,7 @@
 
 #import "CCManageLocation.h"
 #import "AppDelegate.h"
+#import "NCBridgeSwift.h"
 
 @implementation CCManageLocation
 
@@ -64,7 +65,7 @@
     AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
     CLLocation* location = [locations lastObject];
     
-    NSLog(@"[LOG] update locationManager : latitude %+.6f, longitude %+.6f",location.coordinate.latitude, location.coordinate.longitude);
+    [[NCCommunicationCommon shared] writeLog:[NSString stringWithFormat:@"[LOG] update location manager: latitude %+.6f, longitude %+.6f", location.coordinate.latitude, location.coordinate.longitude]];
     
     appDelegate.currentLatitude = location.coordinate.latitude;
     appDelegate.currentLongitude = location.coordinate.longitude;
@@ -79,7 +80,7 @@
 
 - (void)locationManager:(CLLocationManager *)manager didFailWithError:(NSError *)error
 {
-    NSLog(@"[LOG] locationManager didFailWithError: Unable to start location manager. Error:%@", [error description]);
+    [[NCCommunicationCommon shared] writeLog:[NSString stringWithFormat:@"[LOG] Location manager didFailWithError: Unable to start location manager, %@", [error description]]];
     
     [self.delegate statusAuthorizationLocationChanged];
 }