marinofaggiana 4 years ago
parent
commit
6258cc795f
4 changed files with 12 additions and 1 deletions
  1. 1 1
      Cartfile.resolved
  2. 1 0
      iOSClient/AppDelegate.h
  3. 7 0
      iOSClient/AppDelegate.m
  4. 3 0
      iOSClient/Networking/NCService.swift

+ 1 - 1
Cartfile.resolved

@@ -16,7 +16,7 @@ github "kishikawakatsumi/UICKeyChainStore" "v2.1.2"
 github "krzyzanowskim/OpenSSL" "1.0.218"
 github "malcommac/SwiftRichString" "3.7.1"
 github "marinofaggiana/AFNetworking" "2967678c3e0e98c9b8d7e06222ad12d1f49c26f2"
-github "nextcloud/ios-communication-library" "eff010a3b7858cf098b92a0c0aee2391b75b96a3"
+github "nextcloud/ios-communication-library" "3bccf5fabdd36fcb98bf48ba2f7d1f1903b2e381"
 github "realm/realm-cocoa" "v4.4.0"
 github "rechsteiner/Parchment" "v1.7.0"
 github "scenee/FloatingPanel" "v1.7.4"

+ 1 - 0
iOSClient/AppDelegate.h

@@ -131,6 +131,7 @@
 
 // Setting Account
 - (void)settingActiveAccount:(NSString *)activeAccount activeUrl:(NSString *)activeUrl activeUser:(NSString *)activeUser activeUserID:(NSString *)activeUserID activePassword:(NSString *)activePassword;
+- (void)settingWebDavRoot:(NSString *)webdavRoot;
 - (void)deleteAccount:(NSString *)account wipe:(BOOL)wipe;
 
 // Quick Actions - ShotcutItem

+ 7 - 0
iOSClient/AppDelegate.m

@@ -438,6 +438,13 @@
     [[NCCommunicationCommon sharedInstance] setupWithUser:activeUser userId:activeUserID password:activePassword url:activeUrl userAgent:[CCUtility getUserAgent] capabilitiesGroup:[NCBrandOptions sharedInstance].capabilitiesGroups nextcloudVersion:capabilities.versionMajor delegate:[NCNetworking sharedInstance]];
 }
 
+- (void)settingWebDavRoot:(NSString *)webdavRoot
+{
+    if (webdavRoot != nil) {
+        [[NCCommunicationCommon sharedInstance] setupWithWebDavRoot:webdavRoot davRoot:@"remote.php/dav"];
+    }
+}
+
 - (void)deleteAccount:(NSString *)account wipe:(BOOL)wipe
 {
     [self unsubscribingNextcloudServerPushNotification:account url:self.activeUrl withSubscribing:false];

+ 3 - 0
iOSClient/Networking/NCService.swift

@@ -150,6 +150,9 @@ class NCService: NSObject {
                 // Update capabilities db
                 NCManageDatabase.sharedInstance.addCapabilities(capabilities!, account: account!)
                 
+                // Update webDavRoot
+                self.appDelegate.settingWebDavRoot(capabilities?.coreWebDavRoot)
+                
                 // ------ THEMING -----------------------------------------------------------------------
                 self.appDelegate.settingThemingColorBrand()