Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/ios.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Nextcloud.xcodeproj/project.pbxproj10
-rw-r--r--Widget/Dashboard/DashboardData.swift4
-rw-r--r--Widget/Dashboard/DashboardWidgetView.swift2
-rw-r--r--Widget/Files/FilesData.swift4
-rw-r--r--Widget/Lockscreen/LockscreenData.swift2
-rw-r--r--Widget/Lockscreen/LockscreenWidgetView.swift11
-rw-r--r--iOSClient/AppDelegate.swift20
-rw-r--r--iOSClient/BrowserWeb/NCBrowserWeb.swift10
-rw-r--r--iOSClient/Data/NCElementsJSON.swift7
-rw-r--r--iOSClient/Data/NCManageDatabase+Account.swift4
-rw-r--r--iOSClient/Data/NCManageDatabase+Metadata.swift16
-rw-r--r--iOSClient/Data/NCManageDatabase.swift8
-rw-r--r--iOSClient/Files/NCFiles.swift4
-rw-r--r--iOSClient/Login/NCLoginWeb.swift10
-rw-r--r--iOSClient/Main/Collection Common/NCCollectionViewCommon.swift62
-rw-r--r--iOSClient/Main/NCFunctionCenter.swift45
-rw-r--r--iOSClient/Networking/NCNetworking.swift79
-rw-r--r--iOSClient/Networking/NCNetworkingProcessUpload.swift125
-rw-r--r--iOSClient/Networking/NCService.swift1
-rw-r--r--iOSClient/RichWorkspace/NCViewerRichWorkspaceWebView.swift10
-rw-r--r--iOSClient/Select/NCSelect.swift4
-rw-r--r--iOSClient/Share/Advanced/NCShareAdvancePermission.swift1
-rw-r--r--iOSClient/Share/Advanced/NCShareCells.swift54
-rw-r--r--iOSClient/Share/NCShareNetworking.swift3
-rw-r--r--iOSClient/Shares/NCShares.swift1
-rw-r--r--iOSClient/Supporting Files/af.lproj/Localizable.stringsbin114308 -> 114306 bytes
-rw-r--r--iOSClient/Supporting Files/an.lproj/Localizable.stringsbin113664 -> 113662 bytes
-rw-r--r--iOSClient/Supporting Files/ar.lproj/Localizable.stringsbin111724 -> 111722 bytes
-rw-r--r--iOSClient/Supporting Files/ast.lproj/Localizable.stringsbin114616 -> 114614 bytes
-rw-r--r--iOSClient/Supporting Files/az.lproj/Localizable.stringsbin113986 -> 113984 bytes
-rw-r--r--iOSClient/Supporting Files/be.lproj/Localizable.stringsbin113754 -> 113752 bytes
-rw-r--r--iOSClient/Supporting Files/bg_BG.lproj/Localizable.stringsbin121148 -> 121186 bytes
-rw-r--r--iOSClient/Supporting Files/bn_BD.lproj/Localizable.stringsbin113914 -> 113912 bytes
-rw-r--r--iOSClient/Supporting Files/br.lproj/Localizable.stringsbin118284 -> 118282 bytes
-rw-r--r--iOSClient/Supporting Files/bs.lproj/Localizable.stringsbin113976 -> 113974 bytes
-rw-r--r--iOSClient/Supporting Files/ca.lproj/Localizable.stringsbin120954 -> 120952 bytes
-rw-r--r--iOSClient/Supporting Files/cs-CZ.lproj/Localizable.stringsbin117114 -> 117124 bytes
-rw-r--r--iOSClient/Supporting Files/cy_GB.lproj/Localizable.stringsbin113936 -> 113934 bytes
-rw-r--r--iOSClient/Supporting Files/da.lproj/Localizable.stringsbin114400 -> 114398 bytes
-rw-r--r--iOSClient/Supporting Files/de.lproj/Localizable.stringsbin124250 -> 124286 bytes
-rw-r--r--iOSClient/Supporting Files/el.lproj/Localizable.stringsbin125156 -> 125154 bytes
-rw-r--r--iOSClient/Supporting Files/en-GB.lproj/Localizable.stringsbin113766 -> 113764 bytes
-rw-r--r--iOSClient/Supporting Files/en.lproj/Localizable.strings2
-rw-r--r--iOSClient/Supporting Files/eo.lproj/Localizable.stringsbin114408 -> 114406 bytes
-rw-r--r--iOSClient/Supporting Files/es-419.lproj/Localizable.stringsbin117784 -> 117782 bytes
-rw-r--r--iOSClient/Supporting Files/es-AR.lproj/Localizable.stringsbin116836 -> 116834 bytes
-rw-r--r--iOSClient/Supporting Files/es-CL.lproj/Localizable.stringsbin118714 -> 118712 bytes
-rw-r--r--iOSClient/Supporting Files/es-CO.lproj/Localizable.stringsbin118370 -> 118368 bytes
-rw-r--r--iOSClient/Supporting Files/es-CR.lproj/Localizable.stringsbin118360 -> 118358 bytes
-rw-r--r--iOSClient/Supporting Files/es-DO.lproj/Localizable.stringsbin118368 -> 118366 bytes
-rw-r--r--iOSClient/Supporting Files/es-EC.lproj/Localizable.stringsbin118372 -> 118370 bytes
-rw-r--r--iOSClient/Supporting Files/es-GT.lproj/Localizable.stringsbin118362 -> 118360 bytes
-rw-r--r--iOSClient/Supporting Files/es-HN.lproj/Localizable.stringsbin117774 -> 117772 bytes
-rw-r--r--iOSClient/Supporting Files/es-MX.lproj/Localizable.stringsbin118552 -> 118550 bytes
-rw-r--r--iOSClient/Supporting Files/es-NI.lproj/Localizable.stringsbin117764 -> 117762 bytes
-rw-r--r--iOSClient/Supporting Files/es-PA.lproj/Localizable.stringsbin117764 -> 117762 bytes
-rw-r--r--iOSClient/Supporting Files/es-PE.lproj/Localizable.stringsbin117764 -> 117762 bytes
-rw-r--r--iOSClient/Supporting Files/es-PR.lproj/Localizable.stringsbin117764 -> 117762 bytes
-rw-r--r--iOSClient/Supporting Files/es-PY.lproj/Localizable.stringsbin117790 -> 117788 bytes
-rw-r--r--iOSClient/Supporting Files/es-SV.lproj/Localizable.stringsbin118360 -> 118358 bytes
-rw-r--r--iOSClient/Supporting Files/es-UY.lproj/Localizable.stringsbin117788 -> 117786 bytes
-rw-r--r--iOSClient/Supporting Files/es.lproj/Localizable.stringsbin122192 -> 122178 bytes
-rw-r--r--iOSClient/Supporting Files/et_EE.lproj/Localizable.stringsbin114226 -> 114224 bytes
-rw-r--r--iOSClient/Supporting Files/eu.lproj/Localizable.stringsbin120850 -> 120848 bytes
-rw-r--r--iOSClient/Supporting Files/fa.lproj/Localizable.stringsbin114496 -> 114494 bytes
-rw-r--r--iOSClient/Supporting Files/fi-FI.lproj/Localizable.stringsbin116532 -> 116530 bytes
-rw-r--r--iOSClient/Supporting Files/fo.lproj/Localizable.stringsbin113678 -> 113676 bytes
-rw-r--r--iOSClient/Supporting Files/fr.lproj/Localizable.stringsbin126060 -> 126058 bytes
-rw-r--r--iOSClient/Supporting Files/gd.lproj/Localizable.stringsbin115206 -> 115204 bytes
-rw-r--r--iOSClient/Supporting Files/gl.lproj/Localizable.stringsbin120664 -> 120662 bytes
-rw-r--r--iOSClient/Supporting Files/he.lproj/Localizable.stringsbin111702 -> 111700 bytes
-rw-r--r--iOSClient/Supporting Files/hi_IN.lproj/Localizable.stringsbin113654 -> 113652 bytes
-rw-r--r--iOSClient/Supporting Files/hr.lproj/Localizable.stringsbin118820 -> 118818 bytes
-rw-r--r--iOSClient/Supporting Files/hsb.lproj/Localizable.stringsbin113660 -> 113658 bytes
-rw-r--r--iOSClient/Supporting Files/hu.lproj/Localizable.stringsbin119616 -> 119652 bytes
-rw-r--r--iOSClient/Supporting Files/hy.lproj/Localizable.stringsbin113932 -> 113930 bytes
-rw-r--r--iOSClient/Supporting Files/ia.lproj/Localizable.stringsbin114394 -> 114392 bytes
-rw-r--r--iOSClient/Supporting Files/id.lproj/Localizable.stringsbin114498 -> 114496 bytes
-rw-r--r--iOSClient/Supporting Files/ig.lproj/Localizable.stringsbin113642 -> 113640 bytes
-rw-r--r--iOSClient/Supporting Files/is.lproj/Localizable.stringsbin115930 -> 115928 bytes
-rw-r--r--iOSClient/Supporting Files/it.lproj/Localizable.stringsbin121642 -> 121664 bytes
-rw-r--r--iOSClient/Supporting Files/ja-JP.lproj/Localizable.stringsbin95638 -> 95636 bytes
-rw-r--r--iOSClient/Supporting Files/ka-GE.lproj/Localizable.stringsbin116572 -> 116570 bytes
-rw-r--r--iOSClient/Supporting Files/ka.lproj/Localizable.stringsbin113658 -> 113656 bytes
-rw-r--r--iOSClient/Supporting Files/kab.lproj/Localizable.stringsbin113726 -> 113724 bytes
-rw-r--r--iOSClient/Supporting Files/km.lproj/Localizable.stringsbin113906 -> 113904 bytes
-rw-r--r--iOSClient/Supporting Files/kn.lproj/Localizable.stringsbin114138 -> 114136 bytes
-rw-r--r--iOSClient/Supporting Files/ko.lproj/Localizable.stringsbin92994 -> 92992 bytes
-rw-r--r--iOSClient/Supporting Files/la.lproj/Localizable.stringsbin113644 -> 113642 bytes
-rw-r--r--iOSClient/Supporting Files/lb.lproj/Localizable.stringsbin114034 -> 114032 bytes
-rw-r--r--iOSClient/Supporting Files/lo.lproj/Localizable.stringsbin112150 -> 112148 bytes
-rw-r--r--iOSClient/Supporting Files/lt_LT.lproj/Localizable.stringsbin116470 -> 116468 bytes
-rw-r--r--iOSClient/Supporting Files/lv.lproj/Localizable.stringsbin114684 -> 114688 bytes
-rw-r--r--iOSClient/Supporting Files/mk.lproj/Localizable.stringsbin114978 -> 114976 bytes
-rw-r--r--iOSClient/Supporting Files/mn.lproj/Localizable.stringsbin114416 -> 114414 bytes
-rw-r--r--iOSClient/Supporting Files/mr.lproj/Localizable.stringsbin113632 -> 113630 bytes
-rw-r--r--iOSClient/Supporting Files/ms_MY.lproj/Localizable.stringsbin113774 -> 113772 bytes
-rw-r--r--iOSClient/Supporting Files/my.lproj/Localizable.stringsbin113836 -> 113834 bytes
-rw-r--r--iOSClient/Supporting Files/nb-NO.lproj/Localizable.stringsbin114692 -> 114690 bytes
-rw-r--r--iOSClient/Supporting Files/ne.lproj/Localizable.stringsbin113674 -> 113672 bytes
-rw-r--r--iOSClient/Supporting Files/nl.lproj/Localizable.stringsbin119096 -> 119094 bytes
-rw-r--r--iOSClient/Supporting Files/nn_NO.lproj/Localizable.stringsbin113802 -> 113800 bytes
-rw-r--r--iOSClient/Supporting Files/oc.lproj/Localizable.stringsbin114690 -> 114688 bytes
-rw-r--r--iOSClient/Supporting Files/pl.lproj/Localizable.stringsbin118574 -> 118592 bytes
-rw-r--r--iOSClient/Supporting Files/ps.lproj/Localizable.stringsbin113686 -> 113684 bytes
-rw-r--r--iOSClient/Supporting Files/pt-BR.lproj/Localizable.stringsbin119816 -> 119814 bytes
-rw-r--r--iOSClient/Supporting Files/pt-PT.lproj/Localizable.stringsbin117754 -> 117752 bytes
-rw-r--r--iOSClient/Supporting Files/ro.lproj/Localizable.stringsbin116764 -> 116762 bytes
-rw-r--r--iOSClient/Supporting Files/ru.lproj/Localizable.stringsbin119016 -> 119014 bytes
-rw-r--r--iOSClient/Supporting Files/sc.lproj/Localizable.stringsbin123248 -> 123246 bytes
-rw-r--r--iOSClient/Supporting Files/si.lproj/Localizable.stringsbin114588 -> 114586 bytes
-rw-r--r--iOSClient/Supporting Files/sk-SK.lproj/Localizable.stringsbin118052 -> 118072 bytes
-rw-r--r--iOSClient/Supporting Files/sl.lproj/Localizable.stringsbin119738 -> 119782 bytes
-rw-r--r--iOSClient/Supporting Files/sq.lproj/Localizable.stringsbin115426 -> 115424 bytes
-rw-r--r--iOSClient/Supporting Files/sr.lproj/Localizable.stringsbin115302 -> 115300 bytes
-rw-r--r--iOSClient/Supporting Files/sr@latin.lproj/Localizable.stringsbin113962 -> 113960 bytes
-rw-r--r--iOSClient/Supporting Files/sv.lproj/Localizable.stringsbin115522 -> 115520 bytes
-rw-r--r--iOSClient/Supporting Files/sw.lproj/Localizable.stringsbin113654 -> 113652 bytes
-rw-r--r--iOSClient/Supporting Files/ta.lproj/Localizable.stringsbin113980 -> 113978 bytes
-rw-r--r--iOSClient/Supporting Files/th_TH.lproj/Localizable.stringsbin114058 -> 114056 bytes
-rw-r--r--iOSClient/Supporting Files/tk.lproj/Localizable.stringsbin114340 -> 114338 bytes
-rw-r--r--iOSClient/Supporting Files/tr.lproj/Localizable.stringsbin118230 -> 118210 bytes
-rw-r--r--iOSClient/Supporting Files/ug.lproj/Localizable.stringsbin113820 -> 113818 bytes
-rw-r--r--iOSClient/Supporting Files/uk.lproj/Localizable.stringsbin115170 -> 115210 bytes
-rw-r--r--iOSClient/Supporting Files/ur_PK.lproj/Localizable.stringsbin113692 -> 113690 bytes
-rw-r--r--iOSClient/Supporting Files/uz.lproj/Localizable.stringsbin113654 -> 113652 bytes
-rw-r--r--iOSClient/Supporting Files/vi.lproj/Localizable.stringsbin114532 -> 114530 bytes
-rw-r--r--iOSClient/Supporting Files/zh-Hans.lproj/Localizable.stringsbin85750 -> 84644 bytes
-rw-r--r--iOSClient/Supporting Files/zh-Hant-TW.lproj/Localizable.stringsbin91328 -> 91326 bytes
-rw-r--r--iOSClient/Supporting Files/zh_HK.lproj/Localizable.stringsbin85370 -> 85310 bytes
-rw-r--r--iOSClient/Viewer/NCViewerNextcloudText/NCViewerNextcloudText.swift10
-rw-r--r--iOSClient/Viewer/NCViewerRichdocument/NCViewerRichdocument.swift10
132 files changed, 294 insertions, 225 deletions
diff --git a/Nextcloud.xcodeproj/project.pbxproj b/Nextcloud.xcodeproj/project.pbxproj
index e617f1c78..dbcc69c4c 100644
--- a/Nextcloud.xcodeproj/project.pbxproj
+++ b/Nextcloud.xcodeproj/project.pbxproj
@@ -3619,7 +3619,7 @@
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
- CURRENT_PROJECT_VERSION = 9;
+ CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_TEAM = NKUJUXUJ3B;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
@@ -3643,7 +3643,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
- MARKETING_VERSION = 4.5.4;
+ MARKETING_VERSION = 4.5.5;
ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = "";
SDKROOT = iphoneos;
@@ -3682,7 +3682,7 @@
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
- CURRENT_PROJECT_VERSION = 9;
+ CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_TEAM = NKUJUXUJ3B;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
@@ -3704,7 +3704,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
- MARKETING_VERSION = 4.5.4;
+ MARKETING_VERSION = 4.5.5;
ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = "";
SDKROOT = iphoneos;
@@ -3912,7 +3912,7 @@
repositoryURL = "https://github.com/nextcloud/NextcloudKit";
requirement = {
kind = exactVersion;
- version = 1.2.0;
+ version = 1.3.0;
};
};
F788ECC5263AAAF900ADC67F /* XCRemoteSwiftPackageReference "MarkdownKit" */ = {
diff --git a/Widget/Dashboard/DashboardData.swift b/Widget/Dashboard/DashboardData.swift
index 5a47f9bc2..52f2e2c42 100644
--- a/Widget/Dashboard/DashboardData.swift
+++ b/Widget/Dashboard/DashboardData.swift
@@ -140,7 +140,6 @@ func getDashboardDataEntry(configuration: DashboardIntent?, isPreview: Bool, dis
let (tableDashboard, tableButton) = NCManageDatabase.shared.getDashboardWidget(account: account.account, id: id)
let existsButton = (tableButton?.isEmpty ?? true) ? false : true
- let options = NKRequestOptions(timeout: 15, queue: NKCommon.shared.backgroundQueue)
let title = tableDashboard?.title ?? id
var imagetmp = UIImage(named: "widget")!
@@ -151,7 +150,8 @@ func getDashboardDataEntry(configuration: DashboardIntent?, isPreview: Bool, dis
}
}
let titleImage = imagetmp
-
+
+ let options = NKRequestOptions(timeout: 90, queue: NKCommon.shared.backgroundQueue)
NextcloudKit.shared.getDashboardWidgetsApplication(id, options: options) { _, results, data, error in
Task {
diff --git a/Widget/Dashboard/DashboardWidgetView.swift b/Widget/Dashboard/DashboardWidgetView.swift
index ff2c9c1f5..b733bd11e 100644
--- a/Widget/Dashboard/DashboardWidgetView.swift
+++ b/Widget/Dashboard/DashboardWidgetView.swift
@@ -168,7 +168,7 @@ struct DashboardWidgetView: View {
.background(brandColor)
.foregroundColor(brandTextColor)
.border(brandColor, width: 1)
- .cornerRadius(16)
+ .cornerRadius(.infinity)
})
}
}
diff --git a/Widget/Files/FilesData.swift b/Widget/Files/FilesData.swift
index 8ed5d33ce..a6e9b457e 100644
--- a/Widget/Files/FilesData.swift
+++ b/Widget/Files/FilesData.swift
@@ -197,7 +197,7 @@ func getFilesDataEntry(configuration: AccountIntent?, isPreview: Bool, displaySi
NKCommon.shared.writeLog("[INFO] Start \(NCBrandOptions.shared.brand) widget session with level \(levelLog) " + versionNextcloudiOS)
}
- let options = NKRequestOptions(timeout: 15)
+ let options = NKRequestOptions(timeout: 90, queue: NKCommon.shared.backgroundQueue)
NextcloudKit.shared.searchBodyRequest(serverUrl: account.urlBase, requestBody: requestBody, showHiddenFiles: CCUtility.getShowHiddenFiles(), options: options) { _, files, data, error in
Task {
var datas: [FilesData] = []
@@ -230,7 +230,7 @@ func getFilesDataEntry(configuration: AccountIntent?, isPreview: Bool, displaySi
let fileNamePathOrFileId = CCUtility.returnFileNamePath(fromFileName: file.fileName, serverUrl: file.serverUrl, urlBase: file.urlBase, userId: file.userId, account: account.account)!
let fileNamePreviewLocalPath = CCUtility.getDirectoryProviderStoragePreviewOcId(file.ocId, etag: file.etag)!
let fileNameIconLocalPath = CCUtility.getDirectoryProviderStorageIconOcId(file.ocId, etag: file.etag)!
- let (_, _, imageIcon, _, _, _) = await NextcloudKit.shared.downloadPreview(fileNamePathOrFileId: fileNamePathOrFileId, fileNamePreviewLocalPath: fileNamePreviewLocalPath, widthPreview: NCGlobal.shared.sizePreview, heightPreview: NCGlobal.shared.sizePreview, fileNameIconLocalPath: fileNameIconLocalPath, sizeIcon: NCGlobal.shared.sizeIcon)
+ let (_, _, imageIcon, _, _, _) = await NextcloudKit.shared.downloadPreview(fileNamePathOrFileId: fileNamePathOrFileId, fileNamePreviewLocalPath: fileNamePreviewLocalPath, widthPreview: NCGlobal.shared.sizePreview, heightPreview: NCGlobal.shared.sizePreview, fileNameIconLocalPath: fileNameIconLocalPath, sizeIcon: NCGlobal.shared.sizeIcon, options: options)
if let image = imageIcon {
imageRecent = image
}
diff --git a/Widget/Lockscreen/LockscreenData.swift b/Widget/Lockscreen/LockscreenData.swift
index c6c597140..b0a834b3f 100644
--- a/Widget/Lockscreen/LockscreenData.swift
+++ b/Widget/Lockscreen/LockscreenData.swift
@@ -39,7 +39,6 @@ func getLockscreenDataEntry(configuration: AccountIntent?, isPreview: Bool, fami
var account: tableAccount?
var quotaRelative: Float = 0
- let options = NKRequestOptions(timeout: 15, queue: NKCommon.shared.backgroundQueue)
if isPreview {
return completion(LockscreenData(date: Date(), isPlaceholder: true, activity: "", link: URL(string: "https://")!, quotaRelative: 0, quotaUsed: "", quotaTotal: "", error: false))
@@ -73,6 +72,7 @@ func getLockscreenDataEntry(configuration: AccountIntent?, isPreview: Bool, fami
nextcloudVersion: 0,
delegate: NCNetworking.shared)
+ let options = NKRequestOptions(timeout: 90, queue: NKCommon.shared.backgroundQueue)
if #available(iOSApplicationExtension 16.0, *) {
if family == .accessoryCircular {
NextcloudKit.shared.getUserProfile(options: options) { _, userProfile, _, error in
diff --git a/Widget/Lockscreen/LockscreenWidgetView.swift b/Widget/Lockscreen/LockscreenWidgetView.swift
index fdcb1f2b6..081ecd976 100644
--- a/Widget/Lockscreen/LockscreenWidgetView.swift
+++ b/Widget/Lockscreen/LockscreenWidgetView.swift
@@ -46,8 +46,13 @@ struct LockscreenWidgetView: View {
} else {
Gauge(
value: entry.quotaRelative,
- label: { Text(" " + entry.quotaTotal + " ") },
- currentValueLabel: { Text(entry.quotaUsed) }
+ label: {
+ Text(" " + entry.quotaTotal + " ")
+ .font(.system(size: 8.0))
+ },
+ currentValueLabel: {
+ Text(entry.quotaUsed)
+ }
)
.gaugeStyle(.accessoryCircular)
.redacted(reason: entry.isPlaceholder ? .placeholder : [])
@@ -88,7 +93,7 @@ struct LockscreenWidgetView: View {
@available(iOSApplicationExtension 16.0, *)
struct LockscreenWidgetView_Previews: PreviewProvider {
static var previews: some View {
- let entry = LockscreenData(date: Date(), isPlaceholder: false, activity: "Alba Mayoral changed Marketing / Regional Marketing / Agenda Meetings / Q4 2022 / OCTOBER / 13.11 Afrah Kahlid.md", link: URL(string: "https://")!, quotaRelative: 0.5, quotaUsed: "22 GB", quotaTotal: "50 GB", error: true)
+ let entry = LockscreenData(date: Date(), isPlaceholder: false, activity: "Alba Mayoral changed Marketing / Regional Marketing / Agenda Meetings / Q4 2022 / OCTOBER / 13.11 Afrah Kahlid.md", link: URL(string: "https://")!, quotaRelative: 0.5, quotaUsed: "999 GB", quotaTotal: "999 GB", error: false)
LockscreenWidgetView(entry: entry).previewContext(WidgetPreviewContext(family: .accessoryRectangular)).previewDisplayName("Rectangular")
LockscreenWidgetView(entry: entry).previewContext(WidgetPreviewContext(family: .accessoryCircular)).previewDisplayName("Circular")
}
diff --git a/iOSClient/AppDelegate.swift b/iOSClient/AppDelegate.swift
index 676853532..f9f164f2e 100644
--- a/iOSClient/AppDelegate.swift
+++ b/iOSClient/AppDelegate.swift
@@ -48,7 +48,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
@objc var activeViewController: UIViewController?
var mainTabBar: NCMainTabBar?
var activeMetadata: tableMetadata?
- var isSearchingMode: Bool = false
let listFilesVC = ThreadSafeDictionary<String,NCFiles>()
let listFavoriteVC = ThreadSafeDictionary<String,NCFavorite>()
@@ -56,7 +55,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
var disableSharesView: Bool = false
var documentPickerViewController: NCDocumentPickerViewController?
- var shares: [tableShare] = []
var timerErrorNetworking: Timer?
private var privacyProtectionWindow: UIWindow?
@@ -190,6 +188,10 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
NKCommon.shared.writeLog("[INFO] Application did become active")
+ // START OBSERVE/TIMER UPLOAD PROCESS
+ NCNetworkingProcessUpload.shared.observeTableMetadata()
+ NCNetworkingProcessUpload.shared.startTimer()
+
self.deletePasswordSession = false
if !NCAskAuthorization.shared.isRequesting {
@@ -207,9 +209,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
NKCommon.shared.writeLog("[INFO] Initialize Auto upload with \(items) uploads")
}
- // START UPLOAD PROCESS
- NCNetworkingProcessUpload.shared.startTimer()
-
NotificationCenter.default.postOnMainThread(name: NCGlobal.shared.notificationCenterApplicationDidBecomeActive)
}
@@ -244,14 +243,15 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
NKCommon.shared.writeLog("[INFO] Application will resign active")
+ // STOP OBSERVE/TIMER UPLOAD PROCESS
+ NCNetworkingProcessUpload.shared.invalidateObserveTableMetadata()
+ NCNetworkingProcessUpload.shared.stopTimer()
+
if CCUtility.getPrivacyScreenEnabled() {
// Privacy
showPrivacyProtectionWindow()
}
- // STOP UPLOAD PROCESS
- NCNetworkingProcessUpload.shared.stopTimer()
-
// Reload Widget
WidgetCenter.shared.reloadAllTimelines()
@@ -372,7 +372,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
NCAutoUpload.shared.initAutoUpload(viewController: nil) { items in
NKCommon.shared.writeLog("[INFO] Refresh task auto upload with \(items) uploads")
- NCNetworkingProcessUpload.shared.process { items in
+ NCNetworkingProcessUpload.shared.start { items in
NKCommon.shared.writeLog("[INFO] Refresh task upload process with \(items) uploads")
task.setTaskCompleted(success: true)
}
@@ -865,7 +865,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
else if scheme == "nextcloud" && action == "open-file" {
- if !isSearchingMode, let urlComponents = URLComponents(url: url, resolvingAgainstBaseURL: false) {
+ if let urlComponents = URLComponents(url: url, resolvingAgainstBaseURL: false) {
let queryItems = urlComponents.queryItems
guard let userScheme = CCUtility.value(forKey: "user", fromQueryItems: queryItems) else { return false }
diff --git a/iOSClient/BrowserWeb/NCBrowserWeb.swift b/iOSClient/BrowserWeb/NCBrowserWeb.swift
index ae1b4d714..6bb4ed479 100644
--- a/iOSClient/BrowserWeb/NCBrowserWeb.swift
+++ b/iOSClient/BrowserWeb/NCBrowserWeb.swift
@@ -110,10 +110,12 @@ class NCBrowserWeb: UIViewController {
extension NCBrowserWeb: WKNavigationDelegate {
public func webView(_ webView: WKWebView, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
- if let serverTrust = challenge.protectionSpace.serverTrust {
- completionHandler(Foundation.URLSession.AuthChallengeDisposition.useCredential, URLCredential(trust: serverTrust))
- } else {
- completionHandler(URLSession.AuthChallengeDisposition.useCredential, nil)
+ DispatchQueue.global().async {
+ if let serverTrust = challenge.protectionSpace.serverTrust {
+ completionHandler(Foundation.URLSession.AuthChallengeDisposition.useCredential, URLCredential(trust: serverTrust))
+ } else {
+ completionHandler(URLSession.AuthChallengeDisposition.useCredential, nil)
+ }
}
}
diff --git a/iOSClient/Data/NCElementsJSON.swift b/iOSClient/Data/NCElementsJSON.swift
index 962a142c3..b042943cc 100644
--- a/iOSClient/Data/NCElementsJSON.swift
+++ b/iOSClient/Data/NCElementsJSON.swift
@@ -34,8 +34,13 @@ import UIKit
@objc public let capabilitiesFileSharingApiEnabled: Array = ["ocs", "data", "capabilities", "files_sharing", "api_enabled"]
@objc public let capabilitiesFileSharingPubPasswdEnforced: Array = ["ocs", "data", "capabilities", "files_sharing", "public", "password", "enforced"]
+ @objc public let capabilitiesFileSharingPubExpireDateEnforced: Array = ["ocs", "data", "capabilities", "files_sharing", "public", "expire_date", "enforced"]
+ @objc public let capabilitiesFileSharingPubExpireDateDays: Array = ["ocs", "data", "capabilities", "files_sharing", "public", "expire_date", "days"]
+ @objc public let capabilitiesFileSharingInternalExpireDateEnforced: Array = ["ocs", "data", "capabilities", "files_sharing", "public", "expire_date_internal", "enforced"]
+ @objc public let capabilitiesFileSharingInternalExpireDateDays: Array = ["ocs", "data", "capabilities", "files_sharing", "public", "expire_date_internal", "days"]
+ @objc public let capabilitiesFileSharingRemoteExpireDateEnforced: Array = ["ocs", "data", "capabilities", "files_sharing", "public", "expire_date_remote", "enforced"]
+ @objc public let capabilitiesFileSharingRemoteExpireDateDays: Array = ["ocs", "data", "capabilities", "files_sharing", "public", "expire_date_remote", "days"]
@objc public let capabilitiesFileSharingDefaultPermissions: Array = ["ocs", "data", "capabilities", "files_sharing", "default_permissions"]
- // NC >= 23
@objc public let capabilitiesFileSharingSendPasswordMail: Array = ["ocs", "data", "capabilities", "files_sharing", "sharebymail", "send_password_by_mail"]
@objc public let capabilitiesThemingColor: Array = ["ocs", "data", "capabilities", "theming", "color"]
diff --git a/iOSClient/Data/NCManageDatabase+Account.swift b/iOSClient/Data/NCManageDatabase+Account.swift
index 1f840b083..67d8b3e2d 100644
--- a/iOSClient/Data/NCManageDatabase+Account.swift
+++ b/iOSClient/Data/NCManageDatabase+Account.swift
@@ -27,10 +27,6 @@ import NextcloudKit
extension NCManageDatabase {
- @objc func copyObject(account: tableAccount) -> tableAccount {
- return tableAccount.init(value: account)
- }
-
@objc func addAccount(_ account: String, urlBase: String, user: String, password: String) {
let realm = try! Realm()
diff --git a/iOSClient/Data/NCManageDatabase+Metadata.swift b/iOSClient/Data/NCManageDatabase+Metadata.swift
index 7927b2657..84f7f98ea 100644
--- a/iOSClient/Data/NCManageDatabase+Metadata.swift
+++ b/iOSClient/Data/NCManageDatabase+Metadata.swift
@@ -285,22 +285,6 @@ extension NCManageDatabase {
}
}
- @objc func addMetadataServerUrl(ocId: String, serverUrl: String) {
-
- let realm = try! Realm()
-
- do {
- try realm.write {
- let results = realm.objects(tableMetadata.self).filter("ocId == %@", ocId)
- for result in results {
- result.serverUrl = serverUrl
- }
- }
- } catch let error {
- NKCommon.shared.writeLog("Could not write to database: \(error)")
- }
- }
-
@objc func renameMetadata(fileNameTo: String, ocId: String) {
let realm = try! Realm()
diff --git a/iOSClient/Data/NCManageDatabase.swift b/iOSClient/Data/NCManageDatabase.swift
index c63cd2c4b..dcfa25699 100644
--- a/iOSClient/Data/NCManageDatabase.swift
+++ b/iOSClient/Data/NCManageDatabase.swift
@@ -641,10 +641,6 @@ class NCManageDatabase: NSObject {
// MARK: -
// MARK: Table Directory
- @objc func copyObject(directory: tableDirectory) -> tableDirectory {
- return tableDirectory.init(value: directory)
- }
-
@objc func addDirectory(encrypted: Bool, favorite: Bool, ocId: String, fileId: String, etag: String? = nil, permissions: String? = nil, serverUrl: String, account: String) {
let realm = try! Realm()
@@ -1078,10 +1074,6 @@ class NCManageDatabase: NSObject {
// MARK: -
// MARK: Table LocalFile
- @objc func copyObject(localFile: tableLocalFile) -> tableLocalFile {
- return tableLocalFile.init(value: localFile)
- }
-
func addLocalFile(metadata: tableMetadata) {
let realm = try! Realm()
diff --git a/iOSClient/Files/NCFiles.swift b/iOSClient/Files/NCFiles.swift
index ab5d68f5a..d1041a435 100644
--- a/iOSClient/Files/NCFiles.swift
+++ b/iOSClient/Files/NCFiles.swift
@@ -94,7 +94,7 @@ class NCFiles: NCCollectionViewCommon {
DispatchQueue.main.async { self.refreshControl.endRefreshing() }
DispatchQueue.global().async {
- guard !self.appDelegate.isSearchingMode, !self.appDelegate.account.isEmpty, !self.appDelegate.urlBase.isEmpty, !self.serverUrl.isEmpty else { return }
+ guard !self.isSearchingMode, !self.appDelegate.account.isEmpty, !self.appDelegate.urlBase.isEmpty, !self.serverUrl.isEmpty else { return }
let metadatas = NCManageDatabase.shared.getMetadatas(predicate: NSPredicate(format: "account == %@ AND serverUrl == %@", self.appDelegate.account, self.serverUrl))
if self.metadataFolder == nil {
@@ -136,7 +136,7 @@ class NCFiles: NCCollectionViewCommon {
override func reloadDataSourceNetwork(forced: Bool = false) {
super.reloadDataSourceNetwork(forced: forced)
- guard !appDelegate.isSearchingMode else {
+ guard !isSearchingMode else {
networkSearch()
return
}
diff --git a/iOSClient/Login/NCLoginWeb.swift b/iOSClient/Login/NCLoginWeb.swift
index ce5565806..871ba83d4 100644
--- a/iOSClient/Login/NCLoginWeb.swift
+++ b/iOSClient/Login/NCLoginWeb.swift
@@ -259,10 +259,12 @@ extension NCLoginWeb: WKNavigationDelegate {
}
func webView(_ webView: WKWebView, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
- if let serverTrust = challenge.protectionSpace.serverTrust {
- completionHandler(Foundation.URLSession.AuthChallengeDisposition.useCredential, URLCredential(trust: serverTrust))
- } else {
- completionHandler(URLSession.AuthChallengeDisposition.useCredential, nil)
+ DispatchQueue.global().async {
+ if let serverTrust = challenge.protectionSpace.serverTrust {
+ completionHandler(Foundation.URLSession.AuthChallengeDisposition.useCredential, URLCredential(trust: serverTrust))
+ } else {
+ completionHandler(URLSession.AuthChallengeDisposition.useCredential, nil)
+ }
}
}
diff --git a/iOSClient/Main/Collection Common/NCCollectionViewCommon.swift b/iOSClient/Main/Collection Common/NCCollectionViewCommon.swift
index c66ad1c8d..e105f828e 100644
--- a/iOSClient/Main/Collection Common/NCCollectionViewCommon.swift
+++ b/iOSClient/Main/Collection Common/NCCollectionViewCommon.swift
@@ -44,6 +44,7 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
internal var dataSource = NCDataSource()
internal var richWorkspaceText: String?
internal var headerMenu: NCSectionHeaderMenu?
+ internal var isSearchingMode: Bool = false
internal var layoutForView: NCGlobal.layoutForViewType?
internal var selectableDataSource: [RealmSwiftObject] { dataSource.getMetadataSourceForAllSections() }
@@ -88,6 +89,16 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
self.navigationController?.presentationController?.delegate = self
+ // CollectionView & layout
+ listLayout = NCListLayout()
+ gridLayout = NCGridLayout()
+ layoutForView = NCUtility.shared.getLayoutForView(key: layoutKey, serverUrl: serverUrl)
+ gridLayout.itemForLine = CGFloat(layoutForView?.itemForLine ?? 3)
+ if layoutForView?.layout == NCGlobal.shared.layoutList {
+ collectionView?.collectionViewLayout = listLayout
+ } else {
+ collectionView?.collectionViewLayout = gridLayout
+ }
collectionView.alwaysBounceVertical = true
// Color
@@ -118,9 +129,6 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
// Footer
collectionView.register(UINib(nibName: "NCSectionFooter", bundle: nil), forSupplementaryViewOfKind: UICollectionView.elementKindSectionFooter, withReuseIdentifier: "sectionFooter")
- listLayout = NCListLayout()
- gridLayout = NCGridLayout()
-
// Refresh Control
collectionView.addSubview(refreshControl)
refreshControl.action(for: .valueChanged) { _ in
@@ -209,7 +217,7 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
setNavigationItem()
reloadDataSource(forced: false)
- if !appDelegate.isSearchingMode {
+ if !isSearchingMode {
reloadDataSourceNetwork()
}
@@ -284,9 +292,9 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
guard !appDelegate.account.isEmpty else { return }
// Search
- if searchController?.isActive ?? false || appDelegate.isSearchingMode {
+ if searchController?.isActive ?? false || isSearchingMode {
searchController?.isActive = false
- appDelegate.isSearchingMode = false
+ isSearchingMode = false
}
// Select
@@ -336,7 +344,7 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
@objc func reloadDataSourceNetworkForced(_ notification: NSNotification) {
- if !appDelegate.isSearchingMode {
+ if !isSearchingMode {
reloadDataSourceNetwork(forced: true)
}
}
@@ -419,7 +427,7 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
@objc func renameFile(_ notification: NSNotification) {
- if appDelegate.isSearchingMode {
+ if isSearchingMode {
reloadDataSourceNetwork()
} else {
reloadDataSource()
@@ -538,7 +546,7 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
account == appDelegate.account
else { return }
- guard !appDelegate.isSearchingMode, let metadata = NCManageDatabase.shared.getMetadataFromOcId(ocId) else { return }
+ guard !isSearchingMode, let metadata = NCManageDatabase.shared.getMetadataFromOcId(ocId) else { return }
dataSource.addMetadata(metadata)
self.collectionView?.reloadData()
}
@@ -734,7 +742,7 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
func emptyDataSetView(_ view: NCEmptyView) {
self.emptyDataSet?.setOffset(getHeaderHeight())
- if appDelegate.isSearchingMode {
+ if isSearchingMode {
view.emptyImage.image = UIImage(named: "search")?.image(color: .gray, size: UIScreen.main.bounds.width)
if isReloadDataSourceNetworkInProgress {
view.emptyTitle.text = NSLocalizedString("_search_in_progress_", comment: "")
@@ -767,7 +775,7 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
func searchBarTextDidBeginEditing(_ searchBar: UISearchBar) {
- appDelegate.isSearchingMode = true
+ isSearchingMode = true
self.providers?.removeAll()
self.dataSource.clearDataSource()
self.collectionView.reloadData()
@@ -778,7 +786,7 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
func searchBarTextDidEndEditing(_ searchBar: UISearchBar) {
- if appDelegate.isSearchingMode && self.literalSearch?.count ?? 0 >= 2 {
+ if isSearchingMode && self.literalSearch?.count ?? 0 >= 2 {
reloadDataSourceNetwork()
}
}
@@ -788,7 +796,7 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
DispatchQueue.global().async {
NCNetworking.shared.cancelUnifiedSearchFiles()
- self.appDelegate.isSearchingMode = false
+ self.isSearchingMode = false
self.literalSearch = ""
self.providers?.removeAll()
self.dataSource.clearDataSource()
@@ -838,7 +846,7 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
headerMenu?.buttonSwitch.accessibilityLabel = NSLocalizedString("_list_view_", comment: "")
layoutForView?.layout = NCGlobal.shared.layoutGrid
NCUtility.shared.setLayoutForView(key: layoutKey, serverUrl: serverUrl, layout: layoutForView?.layout)
- if appDelegate.isSearchingMode {
+ if isSearchingMode {
self.groupByField = "name"
} else {
self.groupByField = "classFile"
@@ -1009,7 +1017,7 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
layoutForView = NCUtility.shared.getLayoutForView(key: layoutKey, serverUrl: serverUrl)
// set GroupField for Grid
- if !appDelegate.isSearchingMode && layoutForView?.layout == NCGlobal.shared.layoutGrid {
+ if !isSearchingMode && layoutForView?.layout == NCGlobal.shared.layoutGrid {
groupByField = "classFile"
} else {
groupByField = "name"
@@ -1046,7 +1054,7 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
providers: self.providers,
searchResults: self.searchResults)
} update: { account, id, searchResult, metadatas in
- guard let metadatas = metadatas, metadatas.count > 0, self.appDelegate.isSearchingMode , let searchResult = searchResult else { return }
+ guard let metadatas = metadatas, metadatas.count > 0, self.isSearchingMode , let searchResult = searchResult else { return }
NCOperationQueue.shared.unifiedSearchAddSection(collectionViewCommon: self, metadatas: metadatas, searchResult: searchResult)
} completion: { account, error in
self.refreshControl.endRefreshing()
@@ -1059,7 +1067,7 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
self.refreshControl.endRefreshing()
self.collectionView.reloadData()
}
- guard let metadatas = metadatas, error == .success, self.appDelegate.isSearchingMode else { return }
+ guard let metadatas = metadatas, error == .success, self.isSearchingMode else { return }
self.dataSource = NCDataSource(
metadatas: metadatas,
account: self.appDelegate.account,
@@ -1491,7 +1499,7 @@ extension NCCollectionViewCommon: UICollectionViewDataSource {
cell.hideButtonMore(false)
cell.titleInfoTrailingDefault()
- if appDelegate.isSearchingMode {
+ if isSearchingMode {
cell.fileTitleLabel?.text = metadata.fileName
cell.fileTitleLabel?.lineBreakMode = .byTruncatingTail
if metadata.name == NCGlobal.shared.appName {
@@ -1642,7 +1650,7 @@ extension NCCollectionViewCommon: UICollectionViewDataSource {
}
// Separator
- if collectionView.numberOfItems(inSection: indexPath.section) == indexPath.row + 1 || appDelegate.isSearchingMode {
+ if collectionView.numberOfItems(inSection: indexPath.section) == indexPath.row + 1 || isSearchingMode {
cell.cellSeparatorView?.isHidden = true
} else {
cell.cellSeparatorView?.isHidden = false
@@ -1665,7 +1673,7 @@ extension NCCollectionViewCommon: UICollectionViewDataSource {
cell.setAccessibility(label: metadata.fileNameView + ", " + (cell.fileInfoLabel?.text ?? ""), value: a11yValues.joined(separator: ", "))
// Color string find in search
- if appDelegate.isSearchingMode, let literalSearch = self.literalSearch, let title = cell.fileTitleLabel?.text {
+ if isSearchingMode, let literalSearch = self.literalSearch, let title = cell.fileTitleLabel?.text {
let longestWordRange = (title.lowercased() as NSString).range(of: literalSearch)
let attributedString = NSMutableAttributedString(string: title, attributes: [NSAttributedString.Key.font : UIFont.systemFont(ofSize: 15)])
attributedString.setAttributes([NSAttributedString.Key.font : UIFont.boldSystemFont(ofSize: 15), NSAttributedString.Key.foregroundColor : UIColor.systemBlue], range: longestWordRange)
@@ -1694,7 +1702,7 @@ extension NCCollectionViewCommon: UICollectionViewDataSource {
}
header.delegate = self
- if headerMenuButtonsCommand && !appDelegate.isSearchingMode {
+ if headerMenuButtonsCommand && !isSearchingMode {
header.setButtonsCommand(heigt: NCGlobal.shared.heightButtonsCommand, imageButton1: UIImage(named: "addImage"), titleButton1: NSLocalizedString("_upload_", comment: ""), imageButton2: UIImage(named: "folder"), titleButton2: NSLocalizedString("_create_folder_", comment: ""), imageButton3: UIImage(named: "scan"), titleButton3: NSLocalizedString("_scan_", comment: ""))
} else {
header.setButtonsCommand(heigt: 0)
@@ -1749,11 +1757,11 @@ extension NCCollectionViewCommon: UICollectionViewDataSource {
footer.buttonIsHidden(true)
footer.hideActivityIndicatorSection()
- if appDelegate.isSearchingMode {
+ if isSearchingMode {
if sections > 1 && section != sections - 1 {
footer.separatorIsHidden(false)
}
- if appDelegate.isSearchingMode && isPaginated && metadatasCount > 0 {
+ if isSearchingMode && isPaginated && metadatasCount > 0 {
footer.buttonIsHidden(false)
}
if unifiedSearchInProgress {
@@ -1779,7 +1787,7 @@ extension NCCollectionViewCommon: UICollectionViewDelegateFlowLayout {
var size: CGFloat = 0
- if headerMenuButtonsCommand && !appDelegate.isSearchingMode {
+ if headerMenuButtonsCommand && !isSearchingMode {
size += NCGlobal.shared.heightButtonsCommand
}
if headerMenuButtonsView {
@@ -1795,12 +1803,12 @@ extension NCCollectionViewCommon: UICollectionViewDelegateFlowLayout {
if let richWorkspaceText = richWorkspaceText, !headerRichWorkspaceDisable {
let trimmed = richWorkspaceText.trimmingCharacters(in: .whitespaces)
- if trimmed.count > 0 && !appDelegate.isSearchingMode {
+ if trimmed.count > 0 && !isSearchingMode {
headerRichWorkspace = UIScreen.main.bounds.size.height / 6
}
}
- if appDelegate.isSearchingMode || layoutForView?.layout == NCGlobal.shared.layoutGrid || dataSource.numberOfSections() > 1 {
+ if isSearchingMode || layoutForView?.layout == NCGlobal.shared.layoutGrid || dataSource.numberOfSections() > 1 {
if section == 0 {
return (getHeaderHeight(), headerRichWorkspace, NCGlobal.shared.heightSection)
} else {
@@ -1833,7 +1841,7 @@ extension NCCollectionViewCommon: UICollectionViewDelegateFlowLayout {
size.height += NCGlobal.shared.heightFooter
}
- if appDelegate.isSearchingMode && isPaginated && metadatasCount > 0 {
+ if isSearchingMode && isPaginated && metadatasCount > 0 {
size.height += NCGlobal.shared.heightFooterButton
}
diff --git a/iOSClient/Main/NCFunctionCenter.swift b/iOSClient/Main/NCFunctionCenter.swift
index baa2aafad..c1f29f5e1 100644
--- a/iOSClient/Main/NCFunctionCenter.swift
+++ b/iOSClient/Main/NCFunctionCenter.swift
@@ -308,22 +308,35 @@ import Photos
let error = NKError(errorCode: NCGlobal.shared.errorFileNotSaved, errorDescription: "_access_photo_not_enabled_msg_")
return NCContentPresenter.shared.messageNotification("_access_photo_not_enabled_", error: error, delay: NCGlobal.shared.dismissAfterSecond, type: NCContentPresenter.messageType.error)
}
- if metadata.classFile == NKCommon.typeClassFile.image.rawValue, let image = UIImage(contentsOfFile: fileNamePath) {
- UIImageWriteToSavedPhotosAlbum(image, self, #selector(self.saveAlbum(_:didFinishSavingWithError:contextInfo:)), nil)
- } else if metadata.classFile == NKCommon.typeClassFile.video.rawValue, UIVideoAtPathIsCompatibleWithSavedPhotosAlbum(fileNamePath) {
- UISaveVideoAtPathToSavedPhotosAlbum(fileNamePath, self, #selector(self.saveAlbum(_:didFinishSavingWithError:contextInfo:)), nil)
- } else {
- let error = NKError(errorCode: NCGlobal.shared.errorFileNotSaved, errorDescription: "_file_not_saved_cameraroll_")
- NCContentPresenter.shared.messageNotification("_save_selected_files_", error: error, delay: NCGlobal.shared.dismissAfterSecond, type: NCContentPresenter.messageType.error)
- }
- }
- }
- @objc private func saveAlbum(_ image: UIImage, didFinishSavingWithError error: Error?, contextInfo: UnsafeRawPointer) {
-
- if error != nil {
- let error = NKError(errorCode: NCGlobal.shared.errorFileNotSaved, errorDescription: "_file_not_saved_cameraroll_")
- NCContentPresenter.shared.messageNotification("_save_selected_files_", error: error, delay: NCGlobal.shared.dismissAfterSecond, type: NCContentPresenter.messageType.error)
+ let errorSave = NKError(errorCode: NCGlobal.shared.errorFileNotSaved, errorDescription: "_file_not_saved_cameraroll_")
+
+ do {
+ if metadata.classFile == NKCommon.typeClassFile.image.rawValue {
+ let data = try Data(contentsOf: URL(fileURLWithPath: fileNamePath))
+ PHPhotoLibrary.shared().performChanges({
+ let assetRequest = PHAssetCreationRequest.forAsset()
+ assetRequest.addResource(with: .photo, data: data, options: nil)
+ }) { (success, error) in
+ if !success {
+ NCContentPresenter.shared.messageNotification("_save_selected_files_", error: errorSave, delay: NCGlobal.shared.dismissAfterSecond, type: NCContentPresenter.messageType.error)
+ }
+ }
+ } else if metadata.classFile == NKCommon.typeClassFile.video.rawValue {
+ PHPhotoLibrary.shared().performChanges({
+ PHAssetChangeRequest.creationRequestForAssetFromVideo(atFileURL: URL(fileURLWithPath: fileNamePath))
+ }) { (success, error) in
+ if !success {
+ NCContentPresenter.shared.messageNotification("_save_selected_files_", error: errorSave, delay: NCGlobal.shared.dismissAfterSecond, type: NCContentPresenter.messageType.error)
+ }
+ }
+ } else {
+ NCContentPresenter.shared.messageNotification("_save_selected_files_", error: errorSave, delay: NCGlobal.shared.dismissAfterSecond, type: NCContentPresenter.messageType.error)
+ return
+ }
+ } catch {
+ NCContentPresenter.shared.messageNotification("_save_selected_files_", error: errorSave, delay: NCGlobal.shared.dismissAfterSecond, type: NCContentPresenter.messageType.error)
+ }
}
}
@@ -462,8 +475,6 @@ import Photos
func openFileViewInFolder(serverUrl: String, fileNameBlink: String?, fileNameOpen: String?) {
- appDelegate.isSearchingMode = false
-
DispatchQueue.main.asyncAfter(deadline: .now() + 0.3) {
var topNavigationController: UINavigationController?
var pushServerUrl = NCUtilityFileSystem.shared.getHomeServer(urlBase: self.appDelegate.urlBase, userId: self.appDelegate.userId)
diff --git a/iOSClient/Networking/NCNetworking.swift b/iOSClient/Networking/NCNetworking.swift
index 9852ba384..7ba9f0532 100644
--- a/iOSClient/Networking/NCNetworking.swift
+++ b/iOSClient/Networking/NCNetworking.swift
@@ -129,11 +129,8 @@ import Photos
}
func authenticationChallenge(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
-
- if checkTrustedChallenge(session, didReceive: challenge) {
- completionHandler(URLSession.AuthChallengeDisposition.useCredential, URLCredential(trust: challenge.protectionSpace.serverTrust!))
- } else {
- completionHandler(URLSession.AuthChallengeDisposition.performDefaultHandling, nil)
+ DispatchQueue.global().async {
+ self.checkTrustedChallenge(session, didReceive: challenge, completionHandler: completionHandler)
}
}
@@ -158,7 +155,7 @@ import Photos
// MARK: - Pinning check
- private func checkTrustedChallenge(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge) -> Bool {
+ private func checkTrustedChallenge(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
let protectionSpace: URLProtectionSpace = challenge.protectionSpace
let directoryCertificate = CCUtility.getDirectoryCerificates()!
@@ -166,14 +163,6 @@ import Photos
let certificateSavedPath = directoryCertificate + "/" + host + ".der"
var isTrusted: Bool
- #if !EXTENSION
- defer {
- if !isTrusted {
- DispatchQueue.main.async { (UIApplication.shared.delegate as? AppDelegate)?.trustCertificateError(host: host) }
- }
- }
- #endif
-
if let serverTrust: SecTrust = protectionSpace.serverTrust, let certificate = SecTrustGetCertificateAtIndex(serverTrust, 0) {
// extarct certificate txt
@@ -197,8 +186,15 @@ import Photos
} else {
isTrusted = false
}
-
- return isTrusted
+
+ if isTrusted {
+ completionHandler(URLSession.AuthChallengeDisposition.useCredential, URLCredential(trust: challenge.protectionSpace.serverTrust!))
+ } else {
+ #if !EXTENSION
+ DispatchQueue.main.async { (UIApplication.shared.delegate as? AppDelegate)?.trustCertificateError(host: host) }
+ #endif
+ completionHandler(URLSession.AuthChallengeDisposition.performDefaultHandling, nil)
+ }
}
func writeCertificate(host: String) {
@@ -207,9 +203,8 @@ import Photos
let certificateAtPath = directoryCertificate + "/" + host + ".tmp"
let certificateToPath = directoryCertificate + "/" + host + ".der"
- if !NCUtilityFileSystem.shared.moveFile(atPath: certificateAtPath, toPath: certificateToPath) {
- let error = NKError(errorCode: NCGlobal.shared.errorCreationFile, errorDescription: "_error_creation_file_")
- NCContentPresenter.shared.showError(error: error, priority: .max)
+ if !NCUtilityFileSystem.shared.copyFile(atPath: certificateAtPath, toPath: certificateToPath) {
+ NKCommon.shared.writeLog("[ERROR] Write certificare error")
}
}
@@ -221,7 +216,7 @@ import Photos
let x509cert = d2i_X509_bio(mem, nil)
if x509cert == nil {
- print("[LOG] OpenSSL couldn't parse X509 Certificate")
+ NKCommon.shared.writeLog("[ERROR] OpenSSL couldn't parse X509 Certificate")
} else {
// save details
if FileManager.default.fileExists(atPath: certNamePathTXT) {
@@ -1006,16 +1001,34 @@ import Photos
func createFolder(assets: [PHAsset], selector: String, useSubFolder: Bool, account: String, urlBase: String, userId: String) -> Bool {
- let serverUrl = NCManageDatabase.shared.getAccountAutoUploadDirectory(urlBase: urlBase, userId: userId, account: account)
- let fileName = NCManageDatabase.shared.getAccountAutoUploadFileName()
let autoUploadPath = NCManageDatabase.shared.getAccountAutoUploadPath(urlBase: urlBase, userId: userId, account: account)
- var result = createFolderWithSemaphore(fileName: fileName, serverUrl: serverUrl, account: account, urlBase: urlBase, userId: userId)
+ let serverUrlBase = NCManageDatabase.shared.getAccountAutoUploadDirectory(urlBase: urlBase, userId: userId, account: account)
+ let fileNameBase = NCManageDatabase.shared.getAccountAutoUploadFileName()
+
+ func createFolder(fileName: String, serverUrl: String) -> Bool {
+ var result: Bool = false
+ let semaphore = DispatchSemaphore(value: 0)
+ NCNetworking.shared.createFolder(fileName: fileName, serverUrl: serverUrl, account: account, urlBase: urlBase, userId: userId, overwrite: true) { error in
+ if error == .success { result = true }
+ semaphore.signal()
+ }
+ semaphore.wait()
+ return result
+ }
+
+ var result = createFolder(fileName: fileNameBase, serverUrl: serverUrlBase)
if useSubFolder && result {
for dateSubFolder in createNameSubFolder(assets: assets) {
- let fileName = (dateSubFolder as NSString).lastPathComponent
- let serverUrl = ((autoUploadPath + "/" + dateSubFolder) as NSString).deletingLastPathComponent
- result = createFolderWithSemaphore(fileName: fileName, serverUrl: serverUrl, account: account, urlBase: urlBase, userId: userId)
+ let yearMonth = dateSubFolder.split(separator: "/")
+ guard let year = yearMonth.first else { break }
+ guard let month = yearMonth.last else { break }
+ let serverUrlYear = autoUploadPath
+ let serverUrlMonth = autoUploadPath + "/" + year
+ result = createFolder(fileName: String(year), serverUrl: serverUrlYear)
+ if result {
+ result = createFolder(fileName: String(month), serverUrl: serverUrlMonth)
+ }
if !result { break }
}
}
@@ -1023,20 +1036,6 @@ import Photos
return result
}
- private func createFolderWithSemaphore(fileName: String, serverUrl: String, account: String, urlBase: String, userId: String) -> Bool {
-
- var result: Bool = false
- let semaphore = DispatchSemaphore(value: 0)
-
- NCNetworking.shared.createFolder(fileName: fileName, serverUrl: serverUrl, account: account, urlBase: urlBase, userId: userId, overwrite: true) { error in
- if error == .success { result = true }
- semaphore.signal()
- }
- semaphore.wait()
-
- return result
- }
-
func createNameSubFolder(assets: [PHAsset]) -> [String] {
var datesSubFolder: [String] = []
diff --git a/iOSClient/Networking/NCNetworkingProcessUpload.swift b/iOSClient/Networking/NCNetworkingProcessUpload.swift
index 47757d533..c9cda89ac 100644
--- a/iOSClient/Networking/NCNetworkingProcessUpload.swift
+++ b/iOSClient/Networking/NCNetworkingProcessUpload.swift
@@ -25,6 +25,7 @@ import UIKit
import NextcloudKit
import Photos
import JGProgressHUD
+import RealmSwift
class NCNetworkingProcessUpload: NSObject {
public static let shared: NCNetworkingProcessUpload = {
@@ -32,12 +33,43 @@ class NCNetworkingProcessUpload: NSObject {
return instance
}()
- var timerProcess: Timer?
+ private let appDelegate = UIApplication.shared.delegate as! AppDelegate
+ private var notificationToken: NotificationToken?
+ private var timerProcess: Timer?
+ private var pauseProcess: Bool = false
+
+ func observeTableMetadata() {
+ let realm = try! Realm()
+ let results = realm.objects(tableMetadata.self).filter("session != '' || sessionError != ''")
+ notificationToken = results.observe { [weak self] (changes: RealmCollectionChange) in
+ switch changes {
+ case .initial:
+ print("Initial")
+ case .update(_, let deletions, let insertions, let modifications):
+ if (deletions.count > 0 || insertions.count > 0 || modifications.count > 0) {
+ self?.invalidateObserveTableMetadata()
+ self?.start(completition: { items in
+ print("[LOG] PROCESS-UPLOAD-OBSERVE \(items)")
+ DispatchQueue.main.async {
+ self?.observeTableMetadata()
+ }
+ })
+ }
+ case .error(let error):
+ NKCommon.shared.writeLog("[ERROR] Could not write to TableMetadata: \(error)")
+ }
+ }
+ }
+
+ func invalidateObserveTableMetadata() {
+ notificationToken?.invalidate()
+ notificationToken = nil
+ }
func startTimer() {
DispatchQueue.main.async {
self.timerProcess?.invalidate()
- self.timerProcess = Timer.scheduledTimer(timeInterval: 1, target: self, selector: #selector(self.processTimer), userInfo: nil, repeats: true)
+ self.timerProcess = Timer.scheduledTimer(timeInterval: 5, target: self, selector: #selector(self.processTimer), userInfo: nil, repeats: true)
}
}
@@ -47,19 +79,21 @@ class NCNetworkingProcessUpload: NSObject {
}
}
- @objc func processTimer() {
- process { _ in }
+ @objc private func processTimer() {
+ start { items in
+ print("[LOG] PROCESS-UPLOAD-TIMER \(items)")
+ }
}
- func process(completition: @escaping (_ items: Int) -> Void) {
-
- guard let account = NCManageDatabase.shared.getActiveAccount() else { return }
+ func start(completition: @escaping (_ items: Int) -> Void) {
- stopTimer()
+ if appDelegate.account.isEmpty || pauseProcess {
+ return completition(0)
+ } else {
+ pauseProcess = true
+ }
- let appDelegate = UIApplication.shared.delegate as! AppDelegate
let applicationState = UIApplication.shared.applicationState
- let isPasscodePresented = appDelegate.isPasscodePresented()
let queue = DispatchQueue.global()
var maxConcurrentOperationUpload = 10
let viewController = appDelegate.window?.rootViewController
@@ -67,17 +101,15 @@ class NCNetworkingProcessUpload: NSObject {
queue.async {
- let metadatasUpload = NCManageDatabase.shared.getMetadatas(predicate: NSPredicate(format: "status == %d OR status == %d", NCGlobal.shared.metadataStatusInUpload, NCGlobal.shared.metadataStatusUploading))
+ let metadatasUpload = NCManageDatabase.shared.getMetadatas(predicate: NSPredicate(format: "account == %@ AND (status == %d OR status == %d)", self.appDelegate.account, NCGlobal.shared.metadataStatusInUpload, NCGlobal.shared.metadataStatusUploading))
let isWiFi = NCNetworking.shared.networkReachability == NKCommon.typeReachability.reachableEthernetOrWiFi
var counterUpload: Int = 0
let sessionSelectors = [NCGlobal.shared.selectorUploadFileNODelete, NCGlobal.shared.selectorUploadFile, NCGlobal.shared.selectorUploadAutoUpload, NCGlobal.shared.selectorUploadAutoUploadAll]
counterUpload = metadatasUpload.count
- print("[LOG] PROCESS-UPLOAD \(counterUpload)")
-
// Update Badge
- let counterBadge = NCManageDatabase.shared.getMetadatas(predicate: NSPredicate(format: "status == %d OR status == %d OR status == %d", NCGlobal.shared.metadataStatusWaitUpload, NCGlobal.shared.metadataStatusInUpload, NCGlobal.shared.metadataStatusUploading))
+ let counterBadge = NCManageDatabase.shared.getMetadatas(predicate: NSPredicate(format: "account == %@ AND (status == %d OR status == %d OR status == %d)", self.appDelegate.account, NCGlobal.shared.metadataStatusWaitUpload, NCGlobal.shared.metadataStatusInUpload, NCGlobal.shared.metadataStatusUploading))
NotificationCenter.default.postOnMainThread(name: NCGlobal.shared.notificationCenterUpdateBadgeNumber, userInfo: ["counter":counterBadge.count])
NCNetworking.shared.getOcIdInBackgroundSession(queue: queue, completion: { listOcId in
@@ -85,19 +117,13 @@ class NCNetworkingProcessUpload: NSObject {
for sessionSelector in sessionSelectors where counterUpload < maxConcurrentOperationUpload {
let limit = maxConcurrentOperationUpload - counterUpload
- let metadatas = NCManageDatabase.shared.getAdvancedMetadatas(predicate: NSPredicate(format: "sessionSelector == %@ AND status == %d", sessionSelector, NCGlobal.shared.metadataStatusWaitUpload), page: 1, limit: limit, sorted: "date", ascending: true)
+ let metadatas = NCManageDatabase.shared.getAdvancedMetadatas(predicate: NSPredicate(format: "account == %@ AND sessionSelector == %@ AND status == %d", self.appDelegate.account, sessionSelector, NCGlobal.shared.metadataStatusWaitUpload), page: 1, limit: limit, sorted: "date", ascending: true)
if metadatas.count > 0 {
NKCommon.shared.writeLog("[INFO] PROCESS-UPLOAD find \(metadatas.count) items")
}
for metadata in metadatas where counterUpload < maxConcurrentOperationUpload {
- // Different account
- if account.account != metadata.account {
- NKCommon.shared.writeLog("[INFO] Process auto upload skipped file: \(metadata.serverUrl)/\(metadata.fileNameView) on account: \(metadata.account), because the actual account is \(account.account).")
- continue
- }
-
// Is already in upload background? skipped
if listOcId.contains(metadata.ocId) {
NKCommon.shared.writeLog("[INFO] Process auto upload skipped file: \(metadata.serverUrl)/\(metadata.fileNameView), because is already in session.")
@@ -147,49 +173,44 @@ class NCNetworkingProcessUpload: NSObject {
// No upload available ? --> Retry Upload in Error
if counterUpload == 0 {
- let metadatas = NCManageDatabase.shared.getMetadatas(predicate: NSPredicate(format: "status == %d", NCGlobal.shared.metadataStatusUploadError))
+ let metadatas = NCManageDatabase.shared.getMetadatas(predicate: NSPredicate(format: "account == %@ AND status == %d", self.appDelegate.account, NCGlobal.shared.metadataStatusUploadError))
for metadata in metadatas {
NCManageDatabase.shared.setMetadataSession(ocId: metadata.ocId, session: NCNetworking.shared.sessionIdentifierBackground, sessionError: "", sessionTaskIdentifier: 0, status: NCGlobal.shared.metadataStatusWaitUpload)
}
- }
- // verify delete Asset Local Identifiers in auto upload (DELETE Photos album)
- if applicationState == .active && counterUpload == 0 && !isPasscodePresented {
- self.deleteAssetLocalIdentifiers(account: account.account) {
- self.startTimer()
+ // verify delete Asset Local Identifiers in auto upload (DELETE Photos album)
+ if applicationState == .active && metadatas.isEmpty && !self.appDelegate.isPasscodePresented() {
+ self.deleteAssetLocalIdentifiers {
+ self.pauseProcess = false
+ }
+ } else {
+ self.pauseProcess = false
}
- } else if applicationState == .active {
- self.startTimer()
+ } else {
+ self.pauseProcess = false
}
+
completition(counterUpload)
})
}
}
- private func deleteAssetLocalIdentifiers(account: String, completition: @escaping () -> Void) {
+ private func deleteAssetLocalIdentifiers(completition: @escaping () -> Void) {
- DispatchQueue.main.async {
- let metadatasSessionUpload = NCManageDatabase.shared.getMetadatas(predicate: NSPredicate(format: "account == %@ AND session CONTAINS[cd] %@", account, "upload"))
- if !metadatasSessionUpload.isEmpty {
- completition()
- return
- }
- let localIdentifiers = NCManageDatabase.shared.getAssetLocalIdentifiersUploaded(account: account)
- if localIdentifiers.isEmpty {
- completition()
- return
- }
- let assets = PHAsset.fetchAssets(withLocalIdentifiers: localIdentifiers, options: nil)
-
- PHPhotoLibrary.shared().performChanges({
- PHAssetChangeRequest.deleteAssets(assets as NSFastEnumeration)
- }, completionHandler: { _, _ in
- DispatchQueue.main.async {
- NCManageDatabase.shared.clearAssetLocalIdentifiers(localIdentifiers, account: account)
- completition()
- }
- })
- }
+ let metadatasSessionUpload = NCManageDatabase.shared.getMetadatas(predicate: NSPredicate(format: "account == %@ AND session CONTAINS[cd] %@", appDelegate.account, "upload"))
+ if !metadatasSessionUpload.isEmpty { return completition() }
+
+ let localIdentifiers = NCManageDatabase.shared.getAssetLocalIdentifiersUploaded(account: appDelegate.account)
+ if localIdentifiers.isEmpty { return completition() }
+
+ let assets = PHAsset.fetchAssets(withLocalIdentifiers: localIdentifiers, options: nil)
+
+ PHPhotoLibrary.shared().performChanges({
+ PHAssetChangeRequest.deleteAssets(assets as NSFastEnumeration)
+ }, completionHandler: { _, _ in
+ NCManageDatabase.shared.clearAssetLocalIdentifiers(localIdentifiers, account: self.appDelegate.account)
+ completition()
+ })
}
// MARK: -
diff --git a/iOSClient/Networking/NCService.swift b/iOSClient/Networking/NCService.swift
index 67612963a..2ac181dd3 100644
--- a/iOSClient/Networking/NCService.swift
+++ b/iOSClient/Networking/NCService.swift
@@ -201,7 +201,6 @@ class NCService: NSObject {
if let shares = shares, !shares.isEmpty {
NCManageDatabase.shared.addShare(account: self.appDelegate.account, urlBase: self.appDelegate.urlBase, userId: self.appDelegate.userId, shares: shares)
}
- self.appDelegate.shares = NCManageDatabase.shared.getTableShares(account: account)
}
}
}
diff --git a/iOSClient/RichWorkspace/NCViewerRichWorkspaceWebView.swift b/iOSClient/RichWorkspace/NCViewerRichWorkspaceWebView.swift
index 6e6e177e2..9e9b6a1d5 100644
--- a/iOSClient/RichWorkspace/NCViewerRichWorkspaceWebView.swift
+++ b/iOSClient/RichWorkspace/NCViewerRichWorkspaceWebView.swift
@@ -103,10 +103,12 @@ class NCViewerRichWorkspaceWebView: UIViewController, WKNavigationDelegate, WKSc
// MARK: -
public func webView(_ webView: WKWebView, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
- if let serverTrust = challenge.protectionSpace.serverTrust {
- completionHandler(Foundation.URLSession.AuthChallengeDisposition.useCredential, URLCredential(trust: serverTrust))
- } else {
- completionHandler(URLSession.AuthChallengeDisposition.useCredential, nil)
+ DispatchQueue.global().async {
+ if let serverTrust = challenge.protectionSpace.serverTrust {
+ completionHandler(Foundation.URLSession.AuthChallengeDisposition.useCredential, URLCredential(trust: serverTrust))
+ } else {
+ completionHandler(URLSession.AuthChallengeDisposition.useCredential, nil)
+ }
}
}
diff --git a/iOSClient/Select/NCSelect.swift b/iOSClient/Select/NCSelect.swift
index be42db581..e91327326 100644
--- a/iOSClient/Select/NCSelect.swift
+++ b/iOSClient/Select/NCSelect.swift
@@ -80,8 +80,6 @@ class NCSelect: UIViewController, UIGestureRecognizerDelegate, UIAdaptivePresent
private var listLayout: NCListLayout!
private var gridLayout: NCGridLayout!
- private var shares: [tableShare]?
-
private var backgroundImageView = UIImageView()
private var activeAccount: tableAccount!
@@ -185,8 +183,6 @@ class NCSelect: UIViewController, UIGestureRecognizerDelegate, UIAdaptivePresent
}
loadDatasource(withLoadFolder: true)
-
- shares = NCManageDatabase.shared.getTableShares(account: activeAccount.account, serverUrl: serverUrl)
}
override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) {
diff --git a/iOSClient/Share/Advanced/NCShareAdvancePermission.swift b/iOSClient/Share/Advanced/NCShareAdvancePermission.swift
index f8f023d22..607252d22 100644
--- a/iOSClient/Share/Advanced/NCShareAdvancePermission.swift
+++ b/iOSClient/Share/Advanced/NCShareAdvancePermission.swift
@@ -157,6 +157,7 @@ class NCShareAdvancePermission: UITableViewController, NCShareAdvanceFotterDeleg
case .expirationDate:
let cell = tableView.cellForRow(at: indexPath) as? NCShareDateCell
cell?.textField.becomeFirstResponder()
+ cell?.checkMaximumDate(account: metadata.account)
case .password:
guard share.password.isEmpty else {
share.password = ""
diff --git a/iOSClient/Share/Advanced/NCShareCells.swift b/iOSClient/Share/Advanced/NCShareCells.swift
index 4806f6350..6cd2b40ad 100644
--- a/iOSClient/Share/Advanced/NCShareCells.swift
+++ b/iOSClient/Share/Advanced/NCShareCells.swift
@@ -262,16 +262,16 @@ class NCShareToggleCell: UITableViewCell {
class NCShareDateCell: UITableViewCell {
let picker = UIDatePicker()
let textField = UITextField()
-
+ var shareType: Int
var onReload: (() -> Void)?
init(share: NCTableShareable) {
+ self.shareType = share.shareType
super.init(style: .value1, reuseIdentifier: "shareExpDate")
+
picker.datePickerMode = .date
picker.minimumDate = Date()
- if #available(iOS 13.4, *) {
- picker.preferredDatePickerStyle = .wheels
- }
+ picker.preferredDatePickerStyle = .wheels
picker.action(for: .valueChanged) { datePicker in
guard let datePicker = datePicker as? UIDatePicker else { return }
self.detailTextLabel?.text = DateFormatter.shareExpDate.string(from: datePicker.date)
@@ -301,4 +301,50 @@ class NCShareDateCell: UITableViewCell {
required public init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
+
+ func checkMaximumDate(account: String) {
+ let defaultExpDays = defaultExpirationDays(account: account)
+ if defaultExpDays > 0 && isExpireDateEnforced(account: account) {
+ let enforcedInSecs = TimeInterval(defaultExpDays * 24 * 60 * 60)
+ self.picker.maximumDate = Date().advanced(by: enforcedInSecs)
+ }
+ }
+
+ private func isExpireDateEnforced(account: String) -> Bool {
+ switch self.shareType {
+ case NCShareCommon.shared.SHARE_TYPE_LINK,
+ NCShareCommon.shared.SHARE_TYPE_EMAIL,
+ NCShareCommon.shared.SHARE_TYPE_GUEST:
+ return NCManageDatabase.shared.getCapabilitiesServerBool(account: account, elements: NCElementsJSON.shared.capabilitiesFileSharingPubExpireDateEnforced, exists: false)
+ case NCShareCommon.shared.SHARE_TYPE_USER,
+ NCShareCommon.shared.SHARE_TYPE_GROUP,
+ NCShareCommon.shared.SHARE_TYPE_CIRCLE,
+ NCShareCommon.shared.SHARE_TYPE_ROOM:
+ return NCManageDatabase.shared.getCapabilitiesServerBool(account: account, elements: NCElementsJSON.shared.capabilitiesFileSharingInternalExpireDateEnforced, exists: false)
+ case NCShareCommon.shared.SHARE_TYPE_REMOTE,
+ NCShareCommon.shared.SHARE_TYPE_REMOTE_GROUP:
+ return NCManageDatabase.shared.getCapabilitiesServerBool(account: account, elements: NCElementsJSON.shared.capabilitiesFileSharingRemoteExpireDateEnforced, exists: false)
+ default:
+ return false
+ }
+ }
+
+ private func defaultExpirationDays(account: String) -> Int {
+ switch self.shareType {
+ case NCShareCommon.shared.SHARE_TYPE_LINK,
+ NCShareCommon.shared.SHARE_TYPE_EMAIL,
+ NCShareCommon.shared.SHARE_TYPE_GUEST:
+ return NCManageDatabase.shared.getCapabilitiesServerInt(account: account, elements: NCElementsJSON.shared.capabilitiesFileSharingPubExpireDateDays)
+ case NCShareCommon.shared.SHARE_TYPE_USER,
+ NCShareCommon.shared.SHARE_TYPE_GROUP,
+ NCShareCommon.shared.SHARE_TYPE_CIRCLE,
+ NCShareCommon.shared.SHARE_TYPE_ROOM:
+ return NCManageDatabase.shared.getCapabilitiesServerInt(account: account, elements: NCElementsJSON.shared.capabilitiesFileSharingInternalExpireDateDays)
+ case NCShareCommon.shared.SHARE_TYPE_REMOTE,
+ NCShareCommon.shared.SHARE_TYPE_REMOTE_GROUP:
+ return NCManageDatabase.shared.getCapabilitiesServerInt(account: account, elements: NCElementsJSON.shared.capabilitiesFileSharingRemoteExpireDateDays)
+ default:
+ return 0
+ }
+ }
}
diff --git a/iOSClient/Share/NCShareNetworking.swift b/iOSClient/Share/NCShareNetworking.swift
index 360e643a1..2b5364dff 100644
--- a/iOSClient/Share/NCShareNetworking.swift
+++ b/iOSClient/Share/NCShareNetworking.swift
@@ -53,7 +53,6 @@ class NCShareNetworking: NSObject {
if error == .success, let shares = shares {
NCManageDatabase.shared.addShare(account: self.metadata.account, urlBase: self.metadata.urlBase, userId: self.metadata.userId, shares: shares)
- self.appDelegate.shares = NCManageDatabase.shared.getTableShares(account: self.metadata.account)
} else {
NCContentPresenter.shared.showError(error: error)
}
@@ -77,7 +76,6 @@ class NCShareNetworking: NSObject {
if error == .success, let share = share {
option.idShare = share.idShare
NCManageDatabase.shared.addShare(account: self.metadata.account, urlBase: self.metadata.urlBase, userId: self.metadata.userId, shares: [share])
- self.appDelegate.shares = NCManageDatabase.shared.getTableShares(account: self.metadata.account)
if option.hasChanges(comparedTo: share) {
self.updateShare(option: option)
}
@@ -107,7 +105,6 @@ class NCShareNetworking: NSObject {
NCActivityIndicator.shared.stop()
if error == .success, let share = share {
NCManageDatabase.shared.addShare(account: self.metadata.account, urlBase: self.metadata.urlBase, userId: self.metadata.userId, shares: [share])
- self.appDelegate.shares = NCManageDatabase.shared.getTableShares(account: self.metadata.account)
self.delegate?.readShareCompleted()
} else {
NCContentPresenter.shared.showError(error: error)
diff --git a/iOSClient/Shares/NCShares.swift b/iOSClient/Shares/NCShares.swift
index b4dbdf7cc..72198b2e4 100644
--- a/iOSClient/Shares/NCShares.swift
+++ b/iOSClient/Shares/NCShares.swift
@@ -102,7 +102,6 @@ class NCShares: NCCollectionViewCommon {
if let shares = shares, !shares.isEmpty {
NCManageDatabase.shared.addShare(account: self.appDelegate.account, urlBase: self.appDelegate.urlBase, userId: self.appDelegate.userId, shares: shares)
}
- self.appDelegate.shares = NCManageDatabase.shared.getTableShares(account: account)
self.reloadDataSource()
} else {
diff --git a/iOSClient/Supporting Files/af.lproj/Localizable.strings b/iOSClient/Supporting Files/af.lproj/Localizable.strings
index afe3cde27..52b160865 100644
--- a/iOSClient/Supporting Files/af.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/af.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/an.lproj/Localizable.strings b/iOSClient/Supporting Files/an.lproj/Localizable.strings
index f24ad86f7..09fbf4a35 100644
--- a/iOSClient/Supporting Files/an.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/an.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/ar.lproj/Localizable.strings b/iOSClient/Supporting Files/ar.lproj/Localizable.strings
index ab9329081..41a3c9bff 100644
--- a/iOSClient/Supporting Files/ar.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/ar.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/ast.lproj/Localizable.strings b/iOSClient/Supporting Files/ast.lproj/Localizable.strings
index 2cbdd9973..35d73f091 100644
--- a/iOSClient/Supporting Files/ast.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/ast.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/az.lproj/Localizable.strings b/iOSClient/Supporting Files/az.lproj/Localizable.strings
index 6baba2325..7cbd209df 100644
--- a/iOSClient/Supporting Files/az.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/az.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/be.lproj/Localizable.strings b/iOSClient/Supporting Files/be.lproj/Localizable.strings
index 0eb7385a3..80a4d8414 100644
--- a/iOSClient/Supporting Files/be.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/be.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/bg_BG.lproj/Localizable.strings b/iOSClient/Supporting Files/bg_BG.lproj/Localizable.strings
index 7c76764ea..a05ef2b75 100644
--- a/iOSClient/Supporting Files/bg_BG.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/bg_BG.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/bn_BD.lproj/Localizable.strings b/iOSClient/Supporting Files/bn_BD.lproj/Localizable.strings
index 72020eacc..335a575f4 100644
--- a/iOSClient/Supporting Files/bn_BD.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/bn_BD.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/br.lproj/Localizable.strings b/iOSClient/Supporting Files/br.lproj/Localizable.strings
index 780587118..339ef99ef 100644
--- a/iOSClient/Supporting Files/br.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/br.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/bs.lproj/Localizable.strings b/iOSClient/Supporting Files/bs.lproj/Localizable.strings
index c2e044f92..810b09561 100644
--- a/iOSClient/Supporting Files/bs.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/bs.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/ca.lproj/Localizable.strings b/iOSClient/Supporting Files/ca.lproj/Localizable.strings
index 5f76c2cce..bd96618de 100644
--- a/iOSClient/Supporting Files/ca.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/ca.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/cs-CZ.lproj/Localizable.strings b/iOSClient/Supporting Files/cs-CZ.lproj/Localizable.strings
index b23199474..bd159973a 100644
--- a/iOSClient/Supporting Files/cs-CZ.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/cs-CZ.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/cy_GB.lproj/Localizable.strings b/iOSClient/Supporting Files/cy_GB.lproj/Localizable.strings
index ed82c57d5..572689684 100644
--- a/iOSClient/Supporting Files/cy_GB.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/cy_GB.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/da.lproj/Localizable.strings b/iOSClient/Supporting Files/da.lproj/Localizable.strings
index 9130d52c1..291cd45a8 100644
--- a/iOSClient/Supporting Files/da.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/da.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/de.lproj/Localizable.strings b/iOSClient/Supporting Files/de.lproj/Localizable.strings
index dfd46b8ec..40df38175 100644
--- a/iOSClient/Supporting Files/de.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/de.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/el.lproj/Localizable.strings b/iOSClient/Supporting Files/el.lproj/Localizable.strings
index b0761613e..6753ac943 100644
--- a/iOSClient/Supporting Files/el.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/el.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/en-GB.lproj/Localizable.strings b/iOSClient/Supporting Files/en-GB.lproj/Localizable.strings
index 083b209e9..ab35eb484 100644
--- a/iOSClient/Supporting Files/en-GB.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/en-GB.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/en.lproj/Localizable.strings b/iOSClient/Supporting Files/en.lproj/Localizable.strings
index 1f9b1d551..5ab31a60d 100644
--- a/iOSClient/Supporting Files/en.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/en.lproj/Localizable.strings
@@ -897,7 +897,7 @@
"_description_lockscreenwidget_" = "Keep an eye on available space and recent activity";
"_no_items_" = "No items";
"_check_back_later_" = "Check back later";
-"_exporting_video_" = "Exporting video … Tap to cancel …";
+"_exporting_video_" = "Exporting video … Tap to cancel.";
// Video
"_select_trace_" = "Select the trace";
diff --git a/iOSClient/Supporting Files/eo.lproj/Localizable.strings b/iOSClient/Supporting Files/eo.lproj/Localizable.strings
index 7f9f724d8..b5dadb99c 100644
--- a/iOSClient/Supporting Files/eo.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/eo.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/es-419.lproj/Localizable.strings b/iOSClient/Supporting Files/es-419.lproj/Localizable.strings
index a0614923d..394d04ffe 100644
--- a/iOSClient/Supporting Files/es-419.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/es-419.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/es-AR.lproj/Localizable.strings b/iOSClient/Supporting Files/es-AR.lproj/Localizable.strings
index 604c11dcb..45b7f14cf 100644
--- a/iOSClient/Supporting Files/es-AR.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/es-AR.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/es-CL.lproj/Localizable.strings b/iOSClient/Supporting Files/es-CL.lproj/Localizable.strings
index ca7f070c0..b245023e8 100644
--- a/iOSClient/Supporting Files/es-CL.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/es-CL.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/es-CO.lproj/Localizable.strings b/iOSClient/Supporting Files/es-CO.lproj/Localizable.strings
index b9516b928..d95df5838 100644
--- a/iOSClient/Supporting Files/es-CO.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/es-CO.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/es-CR.lproj/Localizable.strings b/iOSClient/Supporting Files/es-CR.lproj/Localizable.strings
index 5de451d24..77d20d86e 100644
--- a/iOSClient/Supporting Files/es-CR.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/es-CR.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/es-DO.lproj/Localizable.strings b/iOSClient/Supporting Files/es-DO.lproj/Localizable.strings
index 24d86bafd..c52e370fb 100644
--- a/iOSClient/Supporting Files/es-DO.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/es-DO.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/es-EC.lproj/Localizable.strings b/iOSClient/Supporting Files/es-EC.lproj/Localizable.strings
index f230348a7..e998d7379 100644
--- a/iOSClient/Supporting Files/es-EC.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/es-EC.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/es-GT.lproj/Localizable.strings b/iOSClient/Supporting Files/es-GT.lproj/Localizable.strings
index 262bbe7f1..940cff166 100644
--- a/iOSClient/Supporting Files/es-GT.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/es-GT.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/es-HN.lproj/Localizable.strings b/iOSClient/Supporting Files/es-HN.lproj/Localizable.strings
index e3ade1ff1..ea68e688b 100644
--- a/iOSClient/Supporting Files/es-HN.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/es-HN.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/es-MX.lproj/Localizable.strings b/iOSClient/Supporting Files/es-MX.lproj/Localizable.strings
index c73ae08cc..ce966a4f5 100644
--- a/iOSClient/Supporting Files/es-MX.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/es-MX.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/es-NI.lproj/Localizable.strings b/iOSClient/Supporting Files/es-NI.lproj/Localizable.strings
index 2042a1ddd..a049252c7 100644
--- a/iOSClient/Supporting Files/es-NI.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/es-NI.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/es-PA.lproj/Localizable.strings b/iOSClient/Supporting Files/es-PA.lproj/Localizable.strings
index 2042a1ddd..a049252c7 100644
--- a/iOSClient/Supporting Files/es-PA.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/es-PA.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/es-PE.lproj/Localizable.strings b/iOSClient/Supporting Files/es-PE.lproj/Localizable.strings
index 2042a1ddd..a049252c7 100644
--- a/iOSClient/Supporting Files/es-PE.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/es-PE.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/es-PR.lproj/Localizable.strings b/iOSClient/Supporting Files/es-PR.lproj/Localizable.strings
index 2042a1ddd..a049252c7 100644
--- a/iOSClient/Supporting Files/es-PR.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/es-PR.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/es-PY.lproj/Localizable.strings b/iOSClient/Supporting Files/es-PY.lproj/Localizable.strings
index 06379c0cb..3818153b1 100644
--- a/iOSClient/Supporting Files/es-PY.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/es-PY.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/es-SV.lproj/Localizable.strings b/iOSClient/Supporting Files/es-SV.lproj/Localizable.strings
index 5de451d24..77d20d86e 100644
--- a/iOSClient/Supporting Files/es-SV.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/es-SV.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/es-UY.lproj/Localizable.strings b/iOSClient/Supporting Files/es-UY.lproj/Localizable.strings
index 756d93b3c..80a44c0db 100644
--- a/iOSClient/Supporting Files/es-UY.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/es-UY.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/es.lproj/Localizable.strings b/iOSClient/Supporting Files/es.lproj/Localizable.strings
index bb9e5e3c4..1d762b5ee 100644
--- a/iOSClient/Supporting Files/es.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/es.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/et_EE.lproj/Localizable.strings b/iOSClient/Supporting Files/et_EE.lproj/Localizable.strings
index 7a7dea27f..b480020e3 100644
--- a/iOSClient/Supporting Files/et_EE.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/et_EE.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/eu.lproj/Localizable.strings b/iOSClient/Supporting Files/eu.lproj/Localizable.strings
index c678d71e8..868522975 100644
--- a/iOSClient/Supporting Files/eu.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/eu.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/fa.lproj/Localizable.strings b/iOSClient/Supporting Files/fa.lproj/Localizable.strings
index d40f14027..d22025b48 100644
--- a/iOSClient/Supporting Files/fa.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/fa.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/fi-FI.lproj/Localizable.strings b/iOSClient/Supporting Files/fi-FI.lproj/Localizable.strings
index e33d9f89e..b101faa66 100644
--- a/iOSClient/Supporting Files/fi-FI.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/fi-FI.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/fo.lproj/Localizable.strings b/iOSClient/Supporting Files/fo.lproj/Localizable.strings
index 48aad3f30..f1fdc76b0 100644
--- a/iOSClient/Supporting Files/fo.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/fo.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/fr.lproj/Localizable.strings b/iOSClient/Supporting Files/fr.lproj/Localizable.strings
index c30cc2ee0..de181549f 100644
--- a/iOSClient/Supporting Files/fr.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/fr.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/gd.lproj/Localizable.strings b/iOSClient/Supporting Files/gd.lproj/Localizable.strings
index 69b9c0aa8..237f469e0 100644
--- a/iOSClient/Supporting Files/gd.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/gd.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/gl.lproj/Localizable.strings b/iOSClient/Supporting Files/gl.lproj/Localizable.strings
index bf01bfcef..a1a81f8ad 100644
--- a/iOSClient/Supporting Files/gl.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/gl.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/he.lproj/Localizable.strings b/iOSClient/Supporting Files/he.lproj/Localizable.strings
index 58b60b2f1..9931910f4 100644
--- a/iOSClient/Supporting Files/he.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/he.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/hi_IN.lproj/Localizable.strings b/iOSClient/Supporting Files/hi_IN.lproj/Localizable.strings
index 19456b87d..749389be0 100644
--- a/iOSClient/Supporting Files/hi_IN.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/hi_IN.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/hr.lproj/Localizable.strings b/iOSClient/Supporting Files/hr.lproj/Localizable.strings
index 5a1bf3629..a7397aa29 100644
--- a/iOSClient/Supporting Files/hr.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/hr.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/hsb.lproj/Localizable.strings b/iOSClient/Supporting Files/hsb.lproj/Localizable.strings
index 6993b4412..400bef52b 100644
--- a/iOSClient/Supporting Files/hsb.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/hsb.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/hu.lproj/Localizable.strings b/iOSClient/Supporting Files/hu.lproj/Localizable.strings
index 820076b0d..825d2f40c 100644
--- a/iOSClient/Supporting Files/hu.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/hu.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/hy.lproj/Localizable.strings b/iOSClient/Supporting Files/hy.lproj/Localizable.strings
index 26564ce6e..5aa0b73e9 100644
--- a/iOSClient/Supporting Files/hy.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/hy.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/ia.lproj/Localizable.strings b/iOSClient/Supporting Files/ia.lproj/Localizable.strings
index a5b1100fc..31c225a03 100644
--- a/iOSClient/Supporting Files/ia.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/ia.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/id.lproj/Localizable.strings b/iOSClient/Supporting Files/id.lproj/Localizable.strings
index 2b53fd14f..9edcb8260 100644
--- a/iOSClient/Supporting Files/id.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/id.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/ig.lproj/Localizable.strings b/iOSClient/Supporting Files/ig.lproj/Localizable.strings
index 397d9b1b5..f5ef6bca0 100644
--- a/iOSClient/Supporting Files/ig.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/ig.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/is.lproj/Localizable.strings b/iOSClient/Supporting Files/is.lproj/Localizable.strings
index b34891c78..6852a0a77 100644
--- a/iOSClient/Supporting Files/is.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/is.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/it.lproj/Localizable.strings b/iOSClient/Supporting Files/it.lproj/Localizable.strings
index f1d6c1879..8ef997aba 100644
--- a/iOSClient/Supporting Files/it.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/it.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/ja-JP.lproj/Localizable.strings b/iOSClient/Supporting Files/ja-JP.lproj/Localizable.strings
index 5702f9b79..9bf40c5d1 100644
--- a/iOSClient/Supporting Files/ja-JP.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/ja-JP.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/ka-GE.lproj/Localizable.strings b/iOSClient/Supporting Files/ka-GE.lproj/Localizable.strings
index dabbc558c..534b7e2fb 100644
--- a/iOSClient/Supporting Files/ka-GE.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/ka-GE.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/ka.lproj/Localizable.strings b/iOSClient/Supporting Files/ka.lproj/Localizable.strings
index 76e522987..8c57090a4 100644
--- a/iOSClient/Supporting Files/ka.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/ka.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/kab.lproj/Localizable.strings b/iOSClient/Supporting Files/kab.lproj/Localizable.strings
index 622674daa..7298e4c47 100644
--- a/iOSClient/Supporting Files/kab.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/kab.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/km.lproj/Localizable.strings b/iOSClient/Supporting Files/km.lproj/Localizable.strings
index 787b53062..a1271f1b5 100644
--- a/iOSClient/Supporting Files/km.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/km.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/kn.lproj/Localizable.strings b/iOSClient/Supporting Files/kn.lproj/Localizable.strings
index 70e94314a..e4e3773a2 100644
--- a/iOSClient/Supporting Files/kn.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/kn.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/ko.lproj/Localizable.strings b/iOSClient/Supporting Files/ko.lproj/Localizable.strings
index f9fbf7316..0f445fa77 100644
--- a/iOSClient/Supporting Files/ko.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/ko.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/la.lproj/Localizable.strings b/iOSClient/Supporting Files/la.lproj/Localizable.strings
index 5b1f152f0..a481c0507 100644
--- a/iOSClient/Supporting Files/la.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/la.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/lb.lproj/Localizable.strings b/iOSClient/Supporting Files/lb.lproj/Localizable.strings
index df074d481..31b021c60 100644
--- a/iOSClient/Supporting Files/lb.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/lb.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/lo.lproj/Localizable.strings b/iOSClient/Supporting Files/lo.lproj/Localizable.strings
index 3fc3e5026..ce1ccadf0 100644
--- a/iOSClient/Supporting Files/lo.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/lo.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/lt_LT.lproj/Localizable.strings b/iOSClient/Supporting Files/lt_LT.lproj/Localizable.strings
index 5103e6839..e613274c6 100644
--- a/iOSClient/Supporting Files/lt_LT.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/lt_LT.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/lv.lproj/Localizable.strings b/iOSClient/Supporting Files/lv.lproj/Localizable.strings
index 7b4c03967..100732ba5 100644
--- a/iOSClient/Supporting Files/lv.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/lv.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/mk.lproj/Localizable.strings b/iOSClient/Supporting Files/mk.lproj/Localizable.strings
index 09aa730be..518674a3e 100644
--- a/iOSClient/Supporting Files/mk.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/mk.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/mn.lproj/Localizable.strings b/iOSClient/Supporting Files/mn.lproj/Localizable.strings
index ac096f1b5..c0930b1e5 100644
--- a/iOSClient/Supporting Files/mn.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/mn.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/mr.lproj/Localizable.strings b/iOSClient/Supporting Files/mr.lproj/Localizable.strings
index 253451741..997f79670 100644
--- a/iOSClient/Supporting Files/mr.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/mr.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/ms_MY.lproj/Localizable.strings b/iOSClient/Supporting Files/ms_MY.lproj/Localizable.strings
index 0cb3d12a7..9a823c37c 100644
--- a/iOSClient/Supporting Files/ms_MY.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/ms_MY.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/my.lproj/Localizable.strings b/iOSClient/Supporting Files/my.lproj/Localizable.strings
index 75c147117..5f84c9e0c 100644
--- a/iOSClient/Supporting Files/my.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/my.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/nb-NO.lproj/Localizable.strings b/iOSClient/Supporting Files/nb-NO.lproj/Localizable.strings
index bf98565cf..a83d4e0cd 100644
--- a/iOSClient/Supporting Files/nb-NO.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/nb-NO.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/ne.lproj/Localizable.strings b/iOSClient/Supporting Files/ne.lproj/Localizable.strings
index 552ffd632..ec4a94389 100644
--- a/iOSClient/Supporting Files/ne.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/ne.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/nl.lproj/Localizable.strings b/iOSClient/Supporting Files/nl.lproj/Localizable.strings
index 38f16ce26..cd555acf9 100644
--- a/iOSClient/Supporting Files/nl.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/nl.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/nn_NO.lproj/Localizable.strings b/iOSClient/Supporting Files/nn_NO.lproj/Localizable.strings
index 80f0efc17..775d336ef 100644
--- a/iOSClient/Supporting Files/nn_NO.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/nn_NO.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/oc.lproj/Localizable.strings b/iOSClient/Supporting Files/oc.lproj/Localizable.strings
index dae296c8a..3035a5ebe 100644
--- a/iOSClient/Supporting Files/oc.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/oc.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/pl.lproj/Localizable.strings b/iOSClient/Supporting Files/pl.lproj/Localizable.strings
index a8a7512e3..f19da7e52 100644
--- a/iOSClient/Supporting Files/pl.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/pl.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/ps.lproj/Localizable.strings b/iOSClient/Supporting Files/ps.lproj/Localizable.strings
index 054a95058..0c87c6e75 100644
--- a/iOSClient/Supporting Files/ps.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/ps.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/pt-BR.lproj/Localizable.strings b/iOSClient/Supporting Files/pt-BR.lproj/Localizable.strings
index 716d837f1..fc04b4bc8 100644
--- a/iOSClient/Supporting Files/pt-BR.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/pt-BR.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/pt-PT.lproj/Localizable.strings b/iOSClient/Supporting Files/pt-PT.lproj/Localizable.strings
index d487c00a5..49b3604b7 100644
--- a/iOSClient/Supporting Files/pt-PT.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/pt-PT.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/ro.lproj/Localizable.strings b/iOSClient/Supporting Files/ro.lproj/Localizable.strings
index 7a6384fe8..f441fc0ab 100644
--- a/iOSClient/Supporting Files/ro.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/ro.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/ru.lproj/Localizable.strings b/iOSClient/Supporting Files/ru.lproj/Localizable.strings
index c0274f8ed..6432dcb86 100644
--- a/iOSClient/Supporting Files/ru.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/ru.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/sc.lproj/Localizable.strings b/iOSClient/Supporting Files/sc.lproj/Localizable.strings
index bb94ba064..5ff2ff028 100644
--- a/iOSClient/Supporting Files/sc.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/sc.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/si.lproj/Localizable.strings b/iOSClient/Supporting Files/si.lproj/Localizable.strings
index 5bf8e604f..e8082b6f6 100644
--- a/iOSClient/Supporting Files/si.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/si.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/sk-SK.lproj/Localizable.strings b/iOSClient/Supporting Files/sk-SK.lproj/Localizable.strings
index 9b71eb232..f9d114ece 100644
--- a/iOSClient/Supporting Files/sk-SK.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/sk-SK.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/sl.lproj/Localizable.strings b/iOSClient/Supporting Files/sl.lproj/Localizable.strings
index 21cf5fd72..4ea52fc8a 100644
--- a/iOSClient/Supporting Files/sl.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/sl.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/sq.lproj/Localizable.strings b/iOSClient/Supporting Files/sq.lproj/Localizable.strings
index d81a2884c..a1d548ba1 100644
--- a/iOSClient/Supporting Files/sq.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/sq.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/sr.lproj/Localizable.strings b/iOSClient/Supporting Files/sr.lproj/Localizable.strings
index 266488c86..b1f10d725 100644
--- a/iOSClient/Supporting Files/sr.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/sr.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/sr@latin.lproj/Localizable.strings b/iOSClient/Supporting Files/sr@latin.lproj/Localizable.strings
index 6658bb9b2..6da164bd7 100644
--- a/iOSClient/Supporting Files/sr@latin.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/sr@latin.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/sv.lproj/Localizable.strings b/iOSClient/Supporting Files/sv.lproj/Localizable.strings
index c46753af7..937bcde15 100644
--- a/iOSClient/Supporting Files/sv.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/sv.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/sw.lproj/Localizable.strings b/iOSClient/Supporting Files/sw.lproj/Localizable.strings
index 19456b87d..749389be0 100644
--- a/iOSClient/Supporting Files/sw.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/sw.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/ta.lproj/Localizable.strings b/iOSClient/Supporting Files/ta.lproj/Localizable.strings
index a91e820e0..e1f0fe16b 100644
--- a/iOSClient/Supporting Files/ta.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/ta.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/th_TH.lproj/Localizable.strings b/iOSClient/Supporting Files/th_TH.lproj/Localizable.strings
index 705e428e6..813b5bab9 100644
--- a/iOSClient/Supporting Files/th_TH.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/th_TH.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/tk.lproj/Localizable.strings b/iOSClient/Supporting Files/tk.lproj/Localizable.strings
index fb22850cb..2e8120536 100644
--- a/iOSClient/Supporting Files/tk.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/tk.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/tr.lproj/Localizable.strings b/iOSClient/Supporting Files/tr.lproj/Localizable.strings
index 9c69e89a7..54bfe3799 100644
--- a/iOSClient/Supporting Files/tr.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/tr.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/ug.lproj/Localizable.strings b/iOSClient/Supporting Files/ug.lproj/Localizable.strings
index 7032a34ac..1a957b754 100644
--- a/iOSClient/Supporting Files/ug.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/ug.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/uk.lproj/Localizable.strings b/iOSClient/Supporting Files/uk.lproj/Localizable.strings
index bbc1b2ac1..a1842893a 100644
--- a/iOSClient/Supporting Files/uk.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/uk.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/ur_PK.lproj/Localizable.strings b/iOSClient/Supporting Files/ur_PK.lproj/Localizable.strings
index 4572e1de3..f204dc907 100644
--- a/iOSClient/Supporting Files/ur_PK.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/ur_PK.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/uz.lproj/Localizable.strings b/iOSClient/Supporting Files/uz.lproj/Localizable.strings
index 19456b87d..749389be0 100644
--- a/iOSClient/Supporting Files/uz.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/uz.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/vi.lproj/Localizable.strings b/iOSClient/Supporting Files/vi.lproj/Localizable.strings
index 97acb8c53..be19d60d0 100644
--- a/iOSClient/Supporting Files/vi.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/vi.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/zh-Hans.lproj/Localizable.strings b/iOSClient/Supporting Files/zh-Hans.lproj/Localizable.strings
index 758b4158a..b171e4355 100644
--- a/iOSClient/Supporting Files/zh-Hans.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/zh-Hans.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/zh-Hant-TW.lproj/Localizable.strings b/iOSClient/Supporting Files/zh-Hant-TW.lproj/Localizable.strings
index b7e6b465d..10eabbd72 100644
--- a/iOSClient/Supporting Files/zh-Hant-TW.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/zh-Hant-TW.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/zh_HK.lproj/Localizable.strings b/iOSClient/Supporting Files/zh_HK.lproj/Localizable.strings
index 9fb451d4a..2c4a3045d 100644
--- a/iOSClient/Supporting Files/zh_HK.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/zh_HK.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Viewer/NCViewerNextcloudText/NCViewerNextcloudText.swift b/iOSClient/Viewer/NCViewerNextcloudText/NCViewerNextcloudText.swift
index 9b7335c57..28c862cb7 100644
--- a/iOSClient/Viewer/NCViewerNextcloudText/NCViewerNextcloudText.swift
+++ b/iOSClient/Viewer/NCViewerNextcloudText/NCViewerNextcloudText.swift
@@ -178,10 +178,12 @@ class NCViewerNextcloudText: UIViewController, WKNavigationDelegate, WKScriptMes
// MARK: -
public func webView(_ webView: WKWebView, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
- if let serverTrust = challenge.protectionSpace.serverTrust {
- completionHandler(Foundation.URLSession.AuthChallengeDisposition.useCredential, URLCredential(trust: serverTrust))
- } else {
- completionHandler(URLSession.AuthChallengeDisposition.useCredential, nil)
+ DispatchQueue.global().async {
+ if let serverTrust = challenge.protectionSpace.serverTrust {
+ completionHandler(Foundation.URLSession.AuthChallengeDisposition.useCredential, URLCredential(trust: serverTrust))
+ } else {
+ completionHandler(URLSession.AuthChallengeDisposition.useCredential, nil)
+ }
}
}
diff --git a/iOSClient/Viewer/NCViewerRichdocument/NCViewerRichdocument.swift b/iOSClient/Viewer/NCViewerRichdocument/NCViewerRichdocument.swift
index 22e818863..77d765165 100644
--- a/iOSClient/Viewer/NCViewerRichdocument/NCViewerRichdocument.swift
+++ b/iOSClient/Viewer/NCViewerRichdocument/NCViewerRichdocument.swift
@@ -316,10 +316,12 @@ class NCViewerRichdocument: UIViewController, WKNavigationDelegate, WKScriptMess
// MARK: -
public func webView(_ webView: WKWebView, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
- if let serverTrust = challenge.protectionSpace.serverTrust {
- completionHandler(Foundation.URLSession.AuthChallengeDisposition.useCredential, URLCredential(trust: serverTrust))
- } else {
- completionHandler(URLSession.AuthChallengeDisposition.useCredential, nil)
+ DispatchQueue.global().async {
+ if let serverTrust = challenge.protectionSpace.serverTrust {
+ completionHandler(Foundation.URLSession.AuthChallengeDisposition.useCredential, URLCredential(trust: serverTrust))
+ } else {
+ completionHandler(URLSession.AuthChallengeDisposition.useCredential, nil)
+ }
}
}