marinofaggiana 5 lat temu
rodzic
commit
8929c21e2d

+ 1 - 1
iOSClient/AppDelegate.m

@@ -383,7 +383,7 @@ PKPushRegistry *pushRegistry;
     
     // Setting Account to Networking
     [CCNetworking sharedNetworking].delegate = [NCNetworkingMain sharedInstance];
-    [[NCCommunication sharedInstance] settingAccountWithUser:activeUserID password:activePassword userAgent:[CCUtility getUserAgent]];
+    [[NCCommunication sharedInstance] settingAccountWithUsername:activeUserID password:activePassword userAgent:[CCUtility getUserAgent]];
 }
 
 - (void)deleteAccount:(NSString *)account wipe:(BOOL)wipe

+ 6 - 6
iOSClient/Networking/NCCommunication.swift

@@ -31,14 +31,14 @@ class NCCommunication: NSObject {
         return instance
     }()
     
-    var user = ""
+    var username = ""
     var password = ""
     var userAgent: String?
     
     //MARK: - Settings
 
-    @objc func settingAccount(user: String, password: String, userAgent: String?) {
-        self.user = user
+    @objc func settingAccount(username: String, password: String, userAgent: String?) {
+        self.username = username
         self.password = password
         self.userAgent = userAgent
     }
@@ -63,7 +63,7 @@ class NCCommunication: NSObject {
         }
         
         // headers
-        var headers: HTTPHeaders = [.authorization(username: self.user, password: self.password)]
+        var headers: HTTPHeaders = [.authorization(username: self.username, password: self.password)]
         if let userAgent = self.userAgent { headers.update(.userAgent(userAgent)) }
         headers.update(.contentType("application/xml"))
 
@@ -125,7 +125,7 @@ class NCCommunication: NSObject {
         }
         
         // headers
-        var headers: HTTPHeaders = [.authorization(username: self.user, password: self.password)]
+        var headers: HTTPHeaders = [.authorization(username: self.username, password: self.password)]
         if let userAgent = self.userAgent { headers.update(.userAgent(userAgent)) }
         headers.update(.contentType("application/xml"))
         headers.update(name: "Depth", value: depth)
@@ -203,7 +203,7 @@ class NCCommunication: NSObject {
         }
         
         // headers
-        var headers: HTTPHeaders = [.authorization(username: self.user, password: self.password)]
+        var headers: HTTPHeaders = [.authorization(username: self.username, password: self.password)]
         if let userAgent = self.userAgent { headers.update(.userAgent(userAgent)) }
         
         AF.download(url, method: .get, parameters: nil, encoding: URLEncoding.default, headers: headers, interceptor: nil, to: destination).downloadProgress { progress in