Переглянути джерело

update nextcloudKit

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>
Marino Faggiana 2 роки тому
батько
коміт
7c8b916d02

+ 2 - 2
File Provider Extension/FileProviderData.swift

@@ -96,7 +96,7 @@ class fileProviderData: NSObject {
             accountUrlBase = activeAccount.urlBase
             homeServerUrl = NCUtilityFileSystem.shared.getHomeServer(urlBase: activeAccount.urlBase, userId: activeAccount.userId)
 
-            NKCommon.shared.setup(account: activeAccount.account, user: activeAccount.user, userId: activeAccount.userId, password: CCUtility.getPassword(activeAccount.account), urlBase: activeAccount.urlBase, userAgent: CCUtility.getUserAgent(), nextcloudVersion: serverVersionMajor, delegate: NCNetworking.shared)
+            NextcloudKit.shared.setup(account: activeAccount.account, user: activeAccount.user, userId: activeAccount.userId, password: CCUtility.getPassword(activeAccount.account), urlBase: activeAccount.urlBase, userAgent: CCUtility.getUserAgent(), nextcloudVersion: serverVersionMajor, delegate: NCNetworking.shared)
             NCNetworking.shared.delegate = providerExtension as? NCNetworkingDelegate
 
             return tableAccount.init(value: activeAccount)
@@ -120,7 +120,7 @@ class fileProviderData: NSObject {
                 accountUrlBase = activeAccount.urlBase
                 homeServerUrl = NCUtilityFileSystem.shared.getHomeServer(urlBase: activeAccount.urlBase, userId: activeAccount.userId)
 
-                NKCommon.shared.setup(account: activeAccount.account, user: activeAccount.user, userId: activeAccount.userId, password: CCUtility.getPassword(activeAccount.account), urlBase: activeAccount.urlBase, userAgent: CCUtility.getUserAgent(), nextcloudVersion: serverVersionMajor, delegate: NCNetworking.shared)
+                NextcloudKit.shared.setup(account: activeAccount.account, user: activeAccount.user, userId: activeAccount.userId, password: CCUtility.getPassword(activeAccount.account), urlBase: activeAccount.urlBase, userAgent: CCUtility.getUserAgent(), nextcloudVersion: serverVersionMajor, delegate: NCNetworking.shared)
                 NCNetworking.shared.delegate = providerExtension as? NCNetworkingDelegate
 
                 return tableAccount.init(value: activeAccount)

+ 2 - 2
Nextcloud.xcodeproj/project.pbxproj

@@ -4021,8 +4021,8 @@
 			isa = XCRemoteSwiftPackageReference;
 			repositoryURL = "https://github.com/nextcloud/NextcloudKit";
 			requirement = {
-				kind = exactVersion;
-				version = 1.5.0;
+				branch = moveSetup;
+				kind = branch;
 			};
 		};
 		F788ECC5263AAAF900ADC67F /* XCRemoteSwiftPackageReference "MarkdownKit" */ = {

+ 1 - 1
Share/NCShareExtension+NCDelegate.swift

@@ -81,7 +81,7 @@ extension NCShareExtension: NCEmptyDataSetDelegate, NCAccountRequestDelegate {
         NCBrandColor.shared.createUserColors()
 
         // NETWORKING
-        NKCommon.shared.setup(
+        NextcloudKit.shared.setup(
             account: activeAccount.account,
             user: activeAccount.user,
             userId: activeAccount.userId,

+ 1 - 1
Widget/Dashboard/DashboardData.swift

@@ -113,7 +113,7 @@ func getDashboardDataEntry(configuration: DashboardIntent?, isPreview: Bool, dis
         
     // NETWORKING
     let password = CCUtility.getPassword(account.account)!
-    NKCommon.shared.setup(
+    NextcloudKit.shared.setup(
         account: account.account,
         user: account.user,
         userId: account.userId,

+ 1 - 1
Widget/Files/FilesData.swift

@@ -125,7 +125,7 @@ func getFilesDataEntry(configuration: AccountIntent?, isPreview: Bool, displaySi
 
     // NETWORKING
     let password = CCUtility.getPassword(account.account)!
-    NKCommon.shared.setup(
+    NextcloudKit.shared.setup(
         account: account.account,
         user: account.user,
         userId: account.userId,

+ 1 - 1
Widget/Lockscreen/LockscreenData.swift

@@ -62,7 +62,7 @@ func getLockscreenDataEntry(configuration: AccountIntent?, isPreview: Bool, fami
 
     // NETWORKING
     let password = CCUtility.getPassword(account.account)!
-    NKCommon.shared.setup(
+    NextcloudKit.shared.setup(
         account: account.account,
         user: account.user,
         userId: account.userId,

+ 5 - 5
iOSClient/AppDelegate.swift

@@ -75,8 +75,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
         CCUtility.createDirectoryStandard()
         CCUtility.emptyTemporaryDirectory()
 
-        NKCommon.shared.setup(delegate: NCNetworking.shared)
-        NKCommon.shared.setup(userAgent: userAgent)
+        NextcloudKit.shared.setup(delegate: NCNetworking.shared)
+        NextcloudKit.shared.setup(userAgent: userAgent)
 
         startTimerErrorNetworking()
 
@@ -377,7 +377,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
             return
         }
 
-        NKCommon.shared.setup(delegate: NCNetworking.shared)
+        NextcloudKit.shared.setup(delegate: NCNetworking.shared)
 
         NCAutoUpload.shared.initAutoUpload(viewController: nil) { items in
             NKCommon.shared.writeLog("[INFO] Refresh task auto upload with \(items) uploads")
@@ -582,10 +582,10 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
 
         _ = NCFunctionCenter.shared
 
-        NKCommon.shared.setup(account: account, user: user, userId: userId, password: password, urlBase: urlBase)
+        NextcloudKit.shared.setup(account: account, user: user, userId: userId, password: password, urlBase: urlBase)
         let serverVersionMajor = NCManageDatabase.shared.getCapabilitiesServerInt(account: account, elements: NCElementsJSON.shared.capabilitiesVersionMajor)
         if serverVersionMajor > 0 {
-            NKCommon.shared.setup(nextcloudVersion: serverVersionMajor)
+            NextcloudKit.shared.setup(nextcloudVersion: serverVersionMajor)
         }
         NCKTVHTTPCache.shared.restartProxy(user: user, password: password)
 

+ 1 - 1
iOSClient/Networking/NCService.swift

@@ -181,7 +181,7 @@ class NCService: NSObject {
 
             // Setup communication
             if serverVersionMajor > 0 {
-                NKCommon.shared.setup(nextcloudVersion: serverVersionMajor)
+                NextcloudKit.shared.setup(nextcloudVersion: serverVersionMajor)
             }
 
             // Theming