Browse Source

New autoupload

marinofaggiana 4 years ago
parent
commit
95671620ba

+ 4 - 6
Nextcloud.xcodeproj/project.pbxproj

@@ -85,6 +85,7 @@
 		F726EEEC1FED1C820030B9C8 /* NCEndToEndInitialize.swift in Sources */ = {isa = PBXBuildFile; fileRef = F726EEEB1FED1C820030B9C8 /* NCEndToEndInitialize.swift */; };
 		F72928A0253B0937009CA4FD /* NCMainNavigationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F729289F253B0937009CA4FD /* NCMainNavigationController.swift */; };
 		F72A47EC2487B06B005AD489 /* NCOperationQueue.swift in Sources */ = {isa = PBXBuildFile; fileRef = F72A47EB2487B06B005AD489 /* NCOperationQueue.swift */; };
+		F72CD63A25C19EBF00F46F9A /* NCAutoUpload.swift in Sources */ = {isa = PBXBuildFile; fileRef = F72CD63925C19EBF00F46F9A /* NCAutoUpload.swift */; };
 		F72D1007210B6882009C96B7 /* NCPushNotificationEncryption.m in Sources */ = {isa = PBXBuildFile; fileRef = F72D1005210B6882009C96B7 /* NCPushNotificationEncryption.m */; };
 		F72D404923D2082500A97FD0 /* NCViewerNextcloudText.swift in Sources */ = {isa = PBXBuildFile; fileRef = F72D404823D2082500A97FD0 /* NCViewerNextcloudText.swift */; };
 		F733B65221997CC2001C1FFA /* TLPhotoPicker.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F733B65121997CC1001C1FFA /* TLPhotoPicker.framework */; };
@@ -191,7 +192,6 @@
 		F77444F8222816D5000D5EB0 /* NCPickerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F77444F7222816D5000D5EB0 /* NCPickerViewController.swift */; };
 		F77A697D250A0FBC00FF1708 /* NCCollectionViewCommon+Menu.swift in Sources */ = {isa = PBXBuildFile; fileRef = F77A697C250A0FBC00FF1708 /* NCCollectionViewCommon+Menu.swift */; };
 		F77B0DF51D118A16002130FE /* CCUtility.m in Sources */ = {isa = PBXBuildFile; fileRef = F7053E3D1C639DF500741EA5 /* CCUtility.m */; };
-		F77B0E221D118A16002130FE /* CCManageLocation.m in Sources */ = {isa = PBXBuildFile; fileRef = F7BFCCC11B68C21900548E76 /* CCManageLocation.m */; };
 		F77B0E301D118A16002130FE /* CCHud.m in Sources */ = {isa = PBXBuildFile; fileRef = F7514EDB1C7B1336008F3338 /* CCHud.m */; };
 		F77B0E4F1D118A16002130FE /* CCManageAutoUpload.m in Sources */ = {isa = PBXBuildFile; fileRef = F7ACE42F1BAC0268006C0017 /* CCManageAutoUpload.m */; };
 		F77B0E5F1D118A16002130FE /* NCSettings.m in Sources */ = {isa = PBXBuildFile; fileRef = F7ACE4311BAC0268006C0017 /* NCSettings.m */; };
@@ -444,6 +444,7 @@
 		F729289F253B0937009CA4FD /* NCMainNavigationController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NCMainNavigationController.swift; sourceTree = "<group>"; };
 		F7296A661C8880ED001A7809 /* CCloadItemData.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CCloadItemData.swift; sourceTree = "<group>"; };
 		F72A47EB2487B06B005AD489 /* NCOperationQueue.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NCOperationQueue.swift; sourceTree = "<group>"; };
+		F72CD63925C19EBF00F46F9A /* NCAutoUpload.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NCAutoUpload.swift; sourceTree = "<group>"; };
 		F72D1005210B6882009C96B7 /* NCPushNotificationEncryption.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NCPushNotificationEncryption.m; sourceTree = "<group>"; };
 		F72D1006210B6882009C96B7 /* NCPushNotificationEncryption.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NCPushNotificationEncryption.h; sourceTree = "<group>"; };
 		F72D404823D2082500A97FD0 /* NCViewerNextcloudText.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NCViewerNextcloudText.swift; sourceTree = "<group>"; };
@@ -639,8 +640,6 @@
 		F7BB04851FD58ACB00BBFD2A /* cs-CZ */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "cs-CZ"; path = "cs-CZ.lproj/Localizable.strings"; sourceTree = "<group>"; };
 		F7BF1B3F1D51E893000854F6 /* CCLogin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCLogin.h; sourceTree = "<group>"; };
 		F7BF1B401D51E893000854F6 /* CCLogin.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCLogin.m; sourceTree = "<group>"; };
-		F7BFCCC01B68C21900548E76 /* CCManageLocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCManageLocation.h; sourceTree = "<group>"; };
-		F7BFCCC11B68C21900548E76 /* CCManageLocation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCManageLocation.m; sourceTree = "<group>"; };
 		F7C0F46E1C8880540059EC54 /* ShareViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = ShareViewController.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
 		F7C0F46F1C8880540059EC54 /* ShareViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = ShareViewController.m; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objc; };
 		F7C1EEA425053A9C00866ACC /* NCDataSource.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NCDataSource.swift; sourceTree = "<group>"; };
@@ -1224,8 +1223,7 @@
 		F7B0C1701EE8397E0033AC24 /* AutoUpload */ = {
 			isa = PBXGroup;
 			children = (
-				F7BFCCC01B68C21900548E76 /* CCManageLocation.h */,
-				F7BFCCC11B68C21900548E76 /* CCManageLocation.m */,
+				F72CD63925C19EBF00F46F9A /* NCAutoUpload.swift */,
 				F7B0C1731EE839A30033AC24 /* CCAutoUpload.h */,
 				F7B0C1741EE839A30033AC24 /* CCAutoUpload.m */,
 			);
@@ -2042,6 +2040,7 @@
 				F76D3CF12428B40E005DFA87 /* NCViewerPDFSearch.swift in Sources */,
 				F73F537F1E929C8500F8678D /* NCMore.swift in Sources */,
 				F78E7065219F096B006F23E4 /* NCAvatar.swift in Sources */,
+				F72CD63A25C19EBF00F46F9A /* NCAutoUpload.swift in Sources */,
 				F7DFB7F0219C5B8000680748 /* NCCreateFormUploadAssets.swift in Sources */,
 				F73B422C2476764F00A30FD3 /* NCNotification.swift in Sources */,
 				371B5A2E23D0B04500FAFAE9 /* NCMainMenuTableViewController.swift in Sources */,
@@ -2065,7 +2064,6 @@
 				F755E6472525946C008DAB45 /* NCCollectionCommon.swift in Sources */,
 				F704B5E92430C0B800632F5F /* NCCreateFormUploadConflictCell.swift in Sources */,
 				F72D404923D2082500A97FD0 /* NCViewerNextcloudText.swift in Sources */,
-				F77B0E221D118A16002130FE /* CCManageLocation.m in Sources */,
 				F700510522DF6A89003A3356 /* NCShare.swift in Sources */,
 				F72D1007210B6882009C96B7 /* NCPushNotificationEncryption.m in Sources */,
 				F769454222E9F0EE000A798A /* NCShareLinkMenuView.swift in Sources */,

+ 1 - 1
iOSClient/AutoUpload/CCAutoUpload.h

@@ -27,7 +27,7 @@
 
 @class tableAccount;
 
-@interface CCAutoUpload : NSObject <CCManageLocationDelegate>
+@interface CCAutoUpload : NSObject
 
 + (CCAutoUpload *)shared;
 

+ 19 - 17
iOSClient/AutoUpload/CCAutoUpload.m

@@ -48,6 +48,10 @@
             
             shared = [CCAutoUpload new];
             shared->appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
+            
+            [[NSNotificationCenter defaultCenter] addObserver:shared selector:@selector(statusAuthorizationLocationChanged) name:NCBrandGlobal.shared.notificationStatusAuthorizationChangedLocation object:nil];
+            [[NSNotificationCenter defaultCenter] addObserver:shared selector:@selector(changedLocation) name:NCBrandGlobal.shared.notificationCenterChangedLocation object:nil];
+
         }
         return shared;
     }
@@ -72,7 +76,7 @@
         
     } else {
         
-        [[CCManageLocation shared] stopSignificantChangeUpdates];
+        [[NCManageLocation shared] stopSignificantChangeUpdates];
     }
 }
 
@@ -93,7 +97,7 @@
         if (account.autoUpload == YES)
             [[NCManageDatabase shared] setAccountAutoUploadProperty:@"autoUpload" state:NO];
         
-        [[CCManageLocation shared] stopSignificantChangeUpdates];
+        [[NCManageLocation shared] stopSignificantChangeUpdates];
         
         UIAlertController *alertController = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"_access_photo_not_enabled_", nil) message:NSLocalizedString(@"_access_photo_not_enabled_msg_", nil) preferredStyle:UIAlertControllerStyleAlert];
         UIAlertAction *okAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"_ok_", nil) style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {}];
@@ -117,7 +121,7 @@
         if (account.autoUpload == YES)
             [[NCManageDatabase shared] setAccountAutoUploadProperty:@"autoUpload" state:NO];
         
-        [[CCManageLocation shared] stopSignificantChangeUpdates];
+        [[NCManageLocation shared] stopSignificantChangeUpdates];
         
         UIAlertController *alertController = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"_access_photo_not_enabled_", nil) message:NSLocalizedString(@"_access_photo_not_enabled_msg_", nil) preferredStyle:UIAlertControllerStyleAlert];
         UIAlertAction *okAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"_ok_", nil) style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {}];
@@ -134,9 +138,7 @@
 - (BOOL)checkIfLocationIsEnabled
 {
     tableAccount *account = [[NCManageDatabase shared] getAccountActive];
-    
-    [CCManageLocation shared].delegate = self;
-    
+        
     if ([CLLocationManager locationServicesEnabled]) {
         
         [[NCCommunicationCommon shared] writeLog:[NSString stringWithFormat:@"Check if location is enabled: authorizationStatus: %d", [CLLocationManager authorizationStatus]]];
@@ -146,7 +148,7 @@
             if ([CLLocationManager authorizationStatus] == kCLAuthorizationStatusNotDetermined ) {
                 
                 [[NCCommunicationCommon shared] writeLog:@"Check if location is enabled: Location services not determined"];
-                [[CCManageLocation shared] startSignificantChangeUpdates];
+                [[NCManageLocation shared] startSignificantChangeUpdates];
                 
             } else {
                 
@@ -178,14 +180,14 @@
                 if (account.autoUploadBackground == NO)
                     [[NCManageDatabase shared] setAccountAutoUploadProperty:@"autoUploadBackground" state:YES];
                 
-                [[CCManageLocation shared] startSignificantChangeUpdates];
+                [[NCManageLocation shared] startSignificantChangeUpdates];
                 
             } else {
                 
                 if (account.autoUploadBackground == YES)
                     [[NCManageDatabase shared] setAccountAutoUploadProperty:@"autoUploadBackground" state:NO];
                 
-                [[CCManageLocation shared] stopSignificantChangeUpdates];
+                [[NCManageLocation shared] stopSignificantChangeUpdates];
                 
                 UIAlertController *alertController = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"_access_photo_not_enabled_", nil) message:NSLocalizedString(@"_access_photo_not_enabled_msg_", nil) preferredStyle:UIAlertControllerStyleAlert];
                 UIAlertAction *okAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"_ok_", nil) style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {}];
@@ -200,7 +202,7 @@
         if (account.autoUploadBackground == YES)
             [[NCManageDatabase shared] setAccountAutoUploadProperty:@"autoUploadBackground" state:NO];
         
-        [[CCManageLocation shared] stopSignificantChangeUpdates];
+        [[NCManageLocation shared] stopSignificantChangeUpdates];
         
         if ([PHPhotoLibrary authorizationStatus] == PHAuthorizationStatusAuthorized) {
             
@@ -234,12 +236,12 @@
             
             if ([PHPhotoLibrary authorizationStatus] == PHAuthorizationStatusAuthorized) {
                 
-                if ([CCManageLocation shared].firstChangeAuthorizationDone) {
-                    
+                if (NCManageLocation.shared.firstChangeAuthorizationDone) {
+                                    
                     if (account.autoUploadBackground == YES)
                         [[NCManageDatabase shared] setAccountAutoUploadProperty:@"autoUploadBackground" state:NO];
                     
-                    [[CCManageLocation shared] stopSignificantChangeUpdates];
+                    [[NCManageLocation shared] stopSignificantChangeUpdates];
                 }
                 
             } else {
@@ -257,7 +259,7 @@
                 
                 [[NCManageDatabase shared] setAccountAutoUploadProperty:@"autoUploadBackground" state:NO];
                 
-                [[CCManageLocation shared] stopSignificantChangeUpdates];
+                [[NCManageLocation shared] stopSignificantChangeUpdates];
                 
                 if ([PHPhotoLibrary authorizationStatus] == PHAuthorizationStatusAuthorized) {
                     
@@ -278,9 +280,9 @@
             }
         }
         
-        if (![CCManageLocation shared].firstChangeAuthorizationDone) {
+        if (!NCManageLocation.shared.firstChangeAuthorizationDone) {
             
-            [CCManageLocation shared].firstChangeAuthorizationDone = YES;
+            NCManageLocation.shared.firstChangeAuthorizationDone = true;
         }
     }
 }
@@ -309,7 +311,7 @@
             if (account.autoUploadBackground == YES)
                 [[NCManageDatabase shared] setAccountAutoUploadProperty:@"autoUploadBackground" state:NO];
             
-            [[CCManageLocation shared] stopSignificantChangeUpdates];
+            [[NCManageLocation shared] stopSignificantChangeUpdates];
         }
     }
 }

+ 0 - 47
iOSClient/AutoUpload/CCManageLocation.h

@@ -1,47 +0,0 @@
-//
-//  CCManageLocation.h
-//  Nextcloud
-//
-//  Created by Marino Faggiana on 23/07/15.
-//  Copyright (c) 2015 Marino Faggiana. All rights reserved.
-//
-//  Author Marino Faggiana <marino.faggiana@nextcloud.com>
-//
-//  This program is free software: you can redistribute it and/or modify
-//  it under the terms of the GNU General Public License as published by
-//  the Free Software Foundation, either version 3 of the License, or
-//  (at your option) any later version.
-//
-//  This program is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-//  GNU General Public License for more details.
-//
-//  You should have received a copy of the GNU General Public License
-//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
-//
-
-#import <Foundation/Foundation.h>
-#import <CoreLocation/CoreLocation.h>
-
-@protocol CCManageLocationDelegate
-
-@optional
-
-- (void)statusAuthorizationLocationChanged;
-- (void)changedLocation;
-
-@end
-
-@interface CCManageLocation : NSObject <CLLocationManagerDelegate>
-
-@property CLLocationManager *locationManager;
-@property BOOL firstChangeAuthorizationDone;
-@property (nonatomic,weak) __weak id<CCManageLocationDelegate> delegate;
-
-+ (CCManageLocation *)shared;
-
-- (void)startSignificantChangeUpdates;
-- (void)stopSignificantChangeUpdates;
-
-@end

+ 0 - 84
iOSClient/AutoUpload/CCManageLocation.m

@@ -1,84 +0,0 @@
-//
-//  CCManageLocation.m
-//  Nextcloud
-//
-//  Created by Marino Faggiana on 23/07/15.
-//  Copyright (c) 2015 Marino Faggiana. All rights reserved.
-//
-//  Author Marino Faggiana <marino.faggiana@nextcloud.com>
-//
-//  This program is free software: you can redistribute it and/or modify
-//  it under the terms of the GNU General Public License as published by
-//  the Free Software Foundation, either version 3 of the License, or
-//  (at your option) any later version.
-//
-//  This program is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-//  GNU General Public License for more details.
-//
-//  You should have received a copy of the GNU General Public License
-//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
-//
-
-#import "CCManageLocation.h"
-#import "AppDelegate.h"
-#import "NCBridgeSwift.h"
-
-@implementation CCManageLocation
-
-+ (CCManageLocation *)shared
-{
-    static CCManageLocation *shared;
-
-    @synchronized(self)
-    {
-        if (!shared){
-            shared = [CCManageLocation new];
-        }
-        return shared;
-    }
-}
-
-- (void)startSignificantChangeUpdates
-{
-    if (self.locationManager == nil) {
-        
-        self.locationManager = [[CLLocationManager alloc] init];
-        self.locationManager.delegate = self;
-        
-        if([self.locationManager respondsToSelector:@selector(requestAlwaysAuthorization)])
-            [self.locationManager requestAlwaysAuthorization];
-    }
-    
-    [self.locationManager startMonitoringSignificantLocationChanges];
-}
-
-- (void)stopSignificantChangeUpdates
-{
-    
-    [self.locationManager stopMonitoringSignificantLocationChanges];
-}
-
-- (void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray *)locations
-{
-    CLLocation* location = [locations lastObject];
-    
-    [[NCCommunicationCommon shared] writeLog:[NSString stringWithFormat:@"update location manager: latitude %+.6f, longitude %+.6f", location.coordinate.latitude, location.coordinate.longitude]];
-        
-    [self.delegate changedLocation];
-}
-
-- (void)locationManager:(CLLocationManager *)manager didChangeAuthorizationStatus:(CLAuthorizationStatus)status
-{
-    [self.delegate statusAuthorizationLocationChanged];
-}
-
-- (void)locationManager:(CLLocationManager *)manager didFailWithError:(NSError *)error
-{
-    [[NCCommunicationCommon shared] writeLog:[NSString stringWithFormat:@"Location manager didFailWithError: Unable to start location manager, %@", [error description]]];
-    
-    [self.delegate statusAuthorizationLocationChanged];
-}
-
-@end

+ 87 - 0
iOSClient/AutoUpload/NCAutoUpload.swift

@@ -0,0 +1,87 @@
+//
+//  NCAutoUpload.swift
+//  Nextcloud
+//
+//  Created by Marino Faggiana on 27/01/21.
+//  Copyright © 2021 Marino Faggiana. All rights reserved.
+//
+//  Author Marino Faggiana <marino.faggiana@nextcloud.com>
+//
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+//
+
+import Foundation
+import CoreLocation
+import NCCommunication
+
+class NCAutoUpload: NSObject {
+    @objc static let shared: NCAutoUpload = {
+        let instance = NCAutoUpload()
+        return instance
+    }()
+    
+}
+
+//MARK: -
+
+//- (void)statusAuthorizationLocationChanged;
+//- (void)changedLocation;
+
+class NCManageLocation: NSObject, CLLocationManagerDelegate {
+    @objc static let shared: NCManageLocation = {
+        let instance = NCManageLocation()
+        return instance
+    }()
+    
+    var locationManager: CLLocationManager?
+    @objc public var firstChangeAuthorizationDone: Bool = false
+    
+    @objc public func startSignificantChangeUpdates() {
+        
+        if locationManager == nil {
+            
+            locationManager = CLLocationManager.init()
+            locationManager?.delegate = self
+            locationManager?.requestAlwaysAuthorization()
+        }
+        
+        locationManager?.startMonitoringSignificantLocationChanges()        
+    }
+    
+    @objc public func stopSignificantChangeUpdates() {
+        
+        locationManager?.stopMonitoringSignificantLocationChanges()
+    }
+    
+    func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) {
+        
+        let location = locations.last
+        let latitude = String(describing: location?.coordinate.latitude)
+        let longitude = String(describing: location?.coordinate.longitude)
+        
+        NCCommunicationCommon.shared.writeLog("update location manager: latitude " + latitude + ", longitude " + longitude)
+        
+        NotificationCenter.default.postOnMainThread(name: NCBrandGlobal.shared.notificationCenterChangedLocation)
+    }
+    
+    func locationManager(_ manager: CLLocationManager, didChangeAuthorization status: CLAuthorizationStatus) {
+        
+        NotificationCenter.default.postOnMainThread(name: NCBrandGlobal.shared.notificationStatusAuthorizationChangedLocation)
+    }
+    
+    func locationManager(_ manager: CLLocationManager, didFailWithError error: Error) {
+        
+        NotificationCenter.default.postOnMainThread(name: NCBrandGlobal.shared.notificationStatusAuthorizationChangedLocation)
+    }
+}

+ 3 - 0
iOSClient/Brand/NCBrand.swift

@@ -482,6 +482,9 @@ class NCBrandColor: NSObject {
 
     @objc let notificationCenterMenuSearchTextPDF               = "menuSearchTextPDF"
     @objc let notificationCenterMenuDetailClose                 = "menuDetailClose"
+    
+    @objc let notificationCenterChangedLocation                 = "changedLocation"
+    @objc let notificationStatusAuthorizationChangedLocation    = "statusAuthorizationChangedLocation"
 }
 
 //DispatchQueue.main.async

+ 0 - 1
iOSClient/Settings/CCManageAutoUpload.h

@@ -22,7 +22,6 @@
 //
 
 #import <XLForm/XLForm.h>
-#import "CCManageLocation.h"
 
 @interface CCManageAutoUpload : XLFormViewController
 

+ 1 - 1
iOSClient/Settings/CCManageAutoUpload.m

@@ -307,7 +307,7 @@
         } else {
             
             [[NCManageDatabase shared] setAccountAutoUploadProperty:@"autoUploadBackground" state:NO];
-            [[CCManageLocation shared] stopSignificantChangeUpdates];
+            [[NCManageLocation shared] stopSignificantChangeUpdates];
         }
     }