|
@@ -23,10 +23,11 @@
|
|
|
|
|
|
import UIKit
|
|
import UIKit
|
|
import BackgroundTasks
|
|
import BackgroundTasks
|
|
-import NCCommunication
|
|
|
|
|
|
+import NextcloudKit
|
|
import TOPasscodeViewController
|
|
import TOPasscodeViewController
|
|
import LocalAuthentication
|
|
import LocalAuthentication
|
|
import Firebase
|
|
import Firebase
|
|
|
|
+import WidgetKit
|
|
|
|
|
|
@UIApplicationMain
|
|
@UIApplicationMain
|
|
class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterDelegate, TOPasscodeViewControllerDelegate, NCAccountRequestDelegate, NCViewCertificateDetailsDelegate, NCUserBaseUrl {
|
|
class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterDelegate, TOPasscodeViewControllerDelegate, NCAccountRequestDelegate, NCViewCertificateDetailsDelegate, NCUserBaseUrl {
|
|
@@ -41,7 +42,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
|
|
@objc var password: String = ""
|
|
@objc var password: String = ""
|
|
|
|
|
|
var deletePasswordSession: Bool = false
|
|
var deletePasswordSession: Bool = false
|
|
- var activeAppConfigView: NCAppConfigView?
|
|
|
|
var activeLogin: NCLogin?
|
|
var activeLogin: NCLogin?
|
|
var activeLoginWeb: NCLoginWeb?
|
|
var activeLoginWeb: NCLoginWeb?
|
|
var activeServerUrl: String = ""
|
|
var activeServerUrl: String = ""
|
|
@@ -60,16 +60,16 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
|
|
var shares: [tableShare] = []
|
|
var shares: [tableShare] = []
|
|
var timerErrorNetworking: Timer?
|
|
var timerErrorNetworking: Timer?
|
|
|
|
|
|
- var errorITMS90076: Bool = false
|
|
|
|
-
|
|
|
|
private var privacyProtectionWindow: UIWindow?
|
|
private var privacyProtectionWindow: UIWindow?
|
|
-
|
|
|
|
|
|
+
|
|
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
|
|
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
|
|
|
|
|
|
let userAgent = CCUtility.getUserAgent() as String
|
|
let userAgent = CCUtility.getUserAgent() as String
|
|
- let isSimulatorOrTestFlight = NCUtility.shared.isSimulatorOrTestFlight()
|
|
|
|
let versionNextcloudiOS = String(format: NCBrandOptions.shared.textCopyrightNextcloudiOS, NCUtility.shared.getVersionApp())
|
|
let versionNextcloudiOS = String(format: NCBrandOptions.shared.textCopyrightNextcloudiOS, NCUtility.shared.getVersionApp())
|
|
|
|
|
|
|
|
+ // Register initialize
|
|
|
|
+ NotificationCenter.default.addObserver(self, selector: #selector(initialize), name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterInitialize), object: nil)
|
|
|
|
+
|
|
UserDefaults.standard.register(defaults: ["UserAgent": userAgent])
|
|
UserDefaults.standard.register(defaults: ["UserAgent": userAgent])
|
|
if !CCUtility.getDisableCrashservice() && !NCBrandOptions.shared.disable_crash_service {
|
|
if !CCUtility.getDisableCrashservice() && !NCBrandOptions.shared.disable_crash_service {
|
|
FirebaseApp.configure()
|
|
FirebaseApp.configure()
|
|
@@ -78,47 +78,38 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
|
|
CCUtility.createDirectoryStandard()
|
|
CCUtility.createDirectoryStandard()
|
|
CCUtility.emptyTemporaryDirectory()
|
|
CCUtility.emptyTemporaryDirectory()
|
|
|
|
|
|
- NCCommunicationCommon.shared.setup(delegate: NCNetworking.shared)
|
|
|
|
- NCCommunicationCommon.shared.setup(userAgent: userAgent)
|
|
|
|
|
|
+ NKCommon.shared.setup(delegate: NCNetworking.shared)
|
|
|
|
+ NKCommon.shared.setup(userAgent: userAgent)
|
|
|
|
|
|
startTimerErrorNetworking()
|
|
startTimerErrorNetworking()
|
|
|
|
|
|
// LOG
|
|
// LOG
|
|
var levelLog = 0
|
|
var levelLog = 0
|
|
if let pathDirectoryGroup = CCUtility.getDirectoryGroup()?.path {
|
|
if let pathDirectoryGroup = CCUtility.getDirectoryGroup()?.path {
|
|
- NCCommunicationCommon.shared.pathLog = pathDirectoryGroup
|
|
|
|
|
|
+ NKCommon.shared.pathLog = pathDirectoryGroup
|
|
}
|
|
}
|
|
|
|
|
|
if NCBrandOptions.shared.disable_log {
|
|
if NCBrandOptions.shared.disable_log {
|
|
|
|
|
|
- NCUtilityFileSystem.shared.deleteFile(filePath: NCCommunicationCommon.shared.filenamePathLog)
|
|
|
|
- NCUtilityFileSystem.shared.deleteFile(filePath: NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true).first! + "/" + NCCommunicationCommon.shared.filenameLog)
|
|
|
|
|
|
+ NCUtilityFileSystem.shared.deleteFile(filePath: NKCommon.shared.filenamePathLog)
|
|
|
|
+ NCUtilityFileSystem.shared.deleteFile(filePath: NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true).first! + "/" + NKCommon.shared.filenameLog)
|
|
|
|
|
|
} else {
|
|
} else {
|
|
|
|
|
|
levelLog = CCUtility.getLogLevel()
|
|
levelLog = CCUtility.getLogLevel()
|
|
- NCCommunicationCommon.shared.levelLog = levelLog
|
|
|
|
- NCCommunicationCommon.shared.copyLogToDocumentDirectory = true
|
|
|
|
- if isSimulatorOrTestFlight {
|
|
|
|
- NCCommunicationCommon.shared.writeLog("Start session with level \(levelLog) " + versionNextcloudiOS + " (Simulator / TestFlight)")
|
|
|
|
- } else {
|
|
|
|
- NCCommunicationCommon.shared.writeLog("Start session with level \(levelLog) " + versionNextcloudiOS)
|
|
|
|
- }
|
|
|
|
|
|
+ NKCommon.shared.levelLog = levelLog
|
|
|
|
+ NKCommon.shared.copyLogToDocumentDirectory = true
|
|
|
|
+ NKCommon.shared.writeLog("[INFO] Start session with level \(levelLog) " + versionNextcloudiOS + " in state \(UIApplication.shared.applicationState.rawValue) where (0 active, 1 inactive, 2 background).")
|
|
}
|
|
}
|
|
|
|
|
|
// LOG Account
|
|
// LOG Account
|
|
if let account = NCManageDatabase.shared.getActiveAccount() {
|
|
if let account = NCManageDatabase.shared.getActiveAccount() {
|
|
- NCCommunicationCommon.shared.writeLog("Account active \(account.account)")
|
|
|
|
|
|
+ NKCommon.shared.writeLog("Account active \(account.account)")
|
|
if CCUtility.getPassword(account.account).isEmpty {
|
|
if CCUtility.getPassword(account.account).isEmpty {
|
|
- NCCommunicationCommon.shared.writeLog("PASSWORD NOT FOUND for \(account.account)")
|
|
|
|
|
|
+ NKCommon.shared.writeLog("[ERROR] PASSWORD NOT FOUND for \(account.account)")
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- // ITMS-90076: Potential Loss of Keychain Access
|
|
|
|
- if let account = NCManageDatabase.shared.getActiveAccount(), CCUtility.getPassword(account.account).isEmpty, NCUtility.shared.getVersionApp(withBuild: false).starts(with: "4.4") {
|
|
|
|
- errorITMS90076 = true
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
// Activate user account
|
|
// Activate user account
|
|
if let activeAccount = NCManageDatabase.shared.getActiveAccount() {
|
|
if let activeAccount = NCManageDatabase.shared.getActiveAccount() {
|
|
|
|
|
|
@@ -147,13 +138,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
|
|
// Create user color
|
|
// Create user color
|
|
NCBrandColor.shared.createUserColors()
|
|
NCBrandColor.shared.createUserColors()
|
|
|
|
|
|
- // initialize
|
|
|
|
- NotificationCenter.default.addObserver(self, selector: #selector(initialize), name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterInitialize), object: nil)
|
|
|
|
- NotificationCenter.default.postOnMainThread(name: NCGlobal.shared.notificationCenterInitialize, userInfo:["atStart":1])
|
|
|
|
-
|
|
|
|
- // Process upload
|
|
|
|
- networkingProcessUpload = NCNetworkingProcessUpload()
|
|
|
|
-
|
|
|
|
// Push Notification & display notification
|
|
// Push Notification & display notification
|
|
application.registerForRemoteNotifications()
|
|
application.registerForRemoteNotifications()
|
|
UNUserNotificationCenter.current().delegate = self
|
|
UNUserNotificationCenter.current().delegate = self
|
|
@@ -167,15 +151,11 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
|
|
}
|
|
}
|
|
|
|
|
|
// Background task: register
|
|
// Background task: register
|
|
- if #available(iOS 13.0, *) {
|
|
|
|
- BGTaskScheduler.shared.register(forTaskWithIdentifier: NCGlobal.shared.refreshTask, using: nil) { task in
|
|
|
|
- self.handleRefreshTask(task)
|
|
|
|
- }
|
|
|
|
- BGTaskScheduler.shared.register(forTaskWithIdentifier: NCGlobal.shared.processingTask, using: nil) { task in
|
|
|
|
- self.handleProcessingTask(task)
|
|
|
|
- }
|
|
|
|
- } else {
|
|
|
|
- application.setMinimumBackgroundFetchInterval(UIApplication.backgroundFetchIntervalMinimum)
|
|
|
|
|
|
+ BGTaskScheduler.shared.register(forTaskWithIdentifier: NCGlobal.shared.refreshTask, using: nil) { task in
|
|
|
|
+ self.handleRefreshTask(task)
|
|
|
|
+ }
|
|
|
|
+ BGTaskScheduler.shared.register(forTaskWithIdentifier: NCGlobal.shared.processingTask, using: nil) { task in
|
|
|
|
+ self.handleProcessingTask(task)
|
|
}
|
|
}
|
|
|
|
|
|
// Intro
|
|
// Intro
|
|
@@ -206,47 +186,43 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
|
|
|
|
|
|
// MARK: - Life Cycle
|
|
// MARK: - Life Cycle
|
|
|
|
|
|
- // L' applicazione entrerà in primo piano (attivo sempre)
|
|
|
|
|
|
+ // L' applicazione entrerà in attivo (sempre)
|
|
func applicationDidBecomeActive(_ application: UIApplication) {
|
|
func applicationDidBecomeActive(_ application: UIApplication) {
|
|
|
|
|
|
|
|
+ NKCommon.shared.writeLog("[INFO] Application did become active")
|
|
|
|
+
|
|
self.deletePasswordSession = false
|
|
self.deletePasswordSession = false
|
|
|
|
|
|
if !NCAskAuthorization.shared.isRequesting {
|
|
if !NCAskAuthorization.shared.isRequesting {
|
|
- // Privacy
|
|
|
|
hidePrivacyProtectionWindow()
|
|
hidePrivacyProtectionWindow()
|
|
}
|
|
}
|
|
|
|
|
|
NCSettingsBundleHelper.setVersionAndBuildNumber()
|
|
NCSettingsBundleHelper.setVersionAndBuildNumber()
|
|
|
|
|
|
- if account == "" { return }
|
|
|
|
-
|
|
|
|
- networkingProcessUpload?.verifyUploadZombie()
|
|
|
|
|
|
+ if !account.isEmpty {
|
|
|
|
+ networkingProcessUpload?.verifyUploadZombie()
|
|
|
|
+ }
|
|
|
|
|
|
NotificationCenter.default.postOnMainThread(name: NCGlobal.shared.notificationCenterApplicationDidBecomeActive)
|
|
NotificationCenter.default.postOnMainThread(name: NCGlobal.shared.notificationCenterApplicationDidBecomeActive)
|
|
}
|
|
}
|
|
|
|
|
|
- // L' applicazione entrerà in primo piano (attivo solo dopo il background)
|
|
|
|
|
|
+ // L' applicazione entrerà in primo piano (dopo il background)
|
|
func applicationWillEnterForeground(_ application: UIApplication) {
|
|
func applicationWillEnterForeground(_ application: UIApplication) {
|
|
|
|
+ guard !account.isEmpty, let activeAccount = NCManageDatabase.shared.getActiveAccount() else { return }
|
|
|
|
|
|
- if account == "" { return }
|
|
|
|
- guard let activeAccount = NCManageDatabase.shared.getActiveAccount() else { return }
|
|
|
|
|
|
+ NKCommon.shared.writeLog("[INFO] Application will enter in foreground")
|
|
|
|
|
|
// Account changed ??
|
|
// Account changed ??
|
|
if activeAccount.account != account {
|
|
if activeAccount.account != account {
|
|
settingAccount(activeAccount.account, urlBase: activeAccount.urlBase, user: activeAccount.user, userId: activeAccount.userId, password: CCUtility.getPassword(activeAccount.account))
|
|
settingAccount(activeAccount.account, urlBase: activeAccount.urlBase, user: activeAccount.user, userId: activeAccount.userId, password: CCUtility.getPassword(activeAccount.account))
|
|
-
|
|
|
|
- NotificationCenter.default.postOnMainThread(name: NCGlobal.shared.notificationCenterInitialize)
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- NCCommunicationCommon.shared.writeLog("Application will enter in foreground")
|
|
|
|
-
|
|
|
|
- // START TIMER UPLOAD PROCESS
|
|
|
|
- if NCUtility.shared.isSimulator() {
|
|
|
|
- networkingProcessUpload?.startTimer()
|
|
|
|
|
|
+ } else {
|
|
|
|
+ // Initialize Auto upload
|
|
|
|
+ NCAutoUpload.shared.initAutoUpload(viewController: nil) { items in
|
|
|
|
+ NKCommon.shared.writeLog("[INFO] Initialize Auto upload with \(items) uploads")
|
|
|
|
+ // START UPLOAD PROCESS
|
|
|
|
+ DispatchQueue.main.async { self.networkingProcessUpload = NCNetworkingProcessUpload() }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
-
|
|
|
|
- // Initialize Auto upload
|
|
|
|
- NCAutoUpload.shared.initAutoUpload(viewController: nil) { _ in }
|
|
|
|
|
|
|
|
// Required unsubscribing / subscribing
|
|
// Required unsubscribing / subscribing
|
|
NCPushNotification.shared().pushNotification()
|
|
NCPushNotification.shared().pushNotification()
|
|
@@ -264,14 +240,18 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
|
|
|
|
|
|
// L' applicazione si dimetterà dallo stato di attivo
|
|
// L' applicazione si dimetterà dallo stato di attivo
|
|
func applicationWillResignActive(_ application: UIApplication) {
|
|
func applicationWillResignActive(_ application: UIApplication) {
|
|
|
|
+ guard !account.isEmpty else { return }
|
|
|
|
|
|
- if account == "" { return }
|
|
|
|
|
|
+ NKCommon.shared.writeLog("[INFO] Application will resign active")
|
|
|
|
|
|
if CCUtility.getPrivacyScreenEnabled() {
|
|
if CCUtility.getPrivacyScreenEnabled() {
|
|
// Privacy
|
|
// Privacy
|
|
showPrivacyProtectionWindow()
|
|
showPrivacyProtectionWindow()
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ // Reload Widget
|
|
|
|
+ WidgetCenter.shared.reloadAllTimelines()
|
|
|
|
+
|
|
// Clear operation queue
|
|
// Clear operation queue
|
|
NCOperationQueue.shared.cancelAllQueue()
|
|
NCOperationQueue.shared.cancelAllQueue()
|
|
// Clear download
|
|
// Clear download
|
|
@@ -288,18 +268,15 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
|
|
|
|
|
|
// L' applicazione è entrata nello sfondo
|
|
// L' applicazione è entrata nello sfondo
|
|
func applicationDidEnterBackground(_ application: UIApplication) {
|
|
func applicationDidEnterBackground(_ application: UIApplication) {
|
|
|
|
+ guard !account.isEmpty else { return }
|
|
|
|
|
|
- if account == "" { return }
|
|
|
|
|
|
+ NKCommon.shared.writeLog("[INFO] Application did enter in background")
|
|
|
|
|
|
- // STOP TIMER UPLOAD PROCESS
|
|
|
|
- if NCUtility.shared.isSimulator() {
|
|
|
|
- networkingProcessUpload?.stopTimer()
|
|
|
|
- }
|
|
|
|
|
|
+ // STOP UPLOAD PROCESS
|
|
|
|
+ networkingProcessUpload?.stopTimer()
|
|
|
|
|
|
- if #available(iOS 13.0, *) {
|
|
|
|
- scheduleAppRefresh()
|
|
|
|
- scheduleBackgroundProcessing()
|
|
|
|
- }
|
|
|
|
|
|
+ scheduleAppRefresh()
|
|
|
|
+ scheduleAppProcessing()
|
|
|
|
|
|
// Passcode
|
|
// Passcode
|
|
presentPasscode { }
|
|
presentPasscode { }
|
|
@@ -311,7 +288,15 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
|
|
func applicationWillTerminate(_ application: UIApplication) {
|
|
func applicationWillTerminate(_ application: UIApplication) {
|
|
|
|
|
|
NCNetworking.shared.cancelAllDownloadTransfer()
|
|
NCNetworking.shared.cancelAllDownloadTransfer()
|
|
- NCCommunicationCommon.shared.writeLog("bye bye")
|
|
|
|
|
|
+
|
|
|
|
+ let content = UNMutableNotificationContent()
|
|
|
|
+ content.title = NCBrandOptions.shared.brand
|
|
|
|
+ content.body = NSLocalizedString("_keep_running_", comment: "")
|
|
|
|
+ let req = UNNotificationRequest(identifier: UUID().uuidString, content: content, trigger: nil)
|
|
|
|
+ let notificationCenter = UNUserNotificationCenter.current()
|
|
|
|
+ notificationCenter.add(req)
|
|
|
|
+
|
|
|
|
+ NKCommon.shared.writeLog("bye bye")
|
|
}
|
|
}
|
|
|
|
|
|
// MARK: -
|
|
// MARK: -
|
|
@@ -319,13 +304,16 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
|
|
@objc private func initialize() {
|
|
@objc private func initialize() {
|
|
guard !account.isEmpty else { return }
|
|
guard !account.isEmpty else { return }
|
|
|
|
|
|
- NCCommunicationCommon.shared.writeLog("initialize Main")
|
|
|
|
|
|
+ NKCommon.shared.writeLog("[INFO] initialize Main")
|
|
|
|
|
|
// Registeration push notification
|
|
// Registeration push notification
|
|
NCPushNotification.shared().pushNotification()
|
|
NCPushNotification.shared().pushNotification()
|
|
|
|
|
|
// Start Auto Upload
|
|
// Start Auto Upload
|
|
- NCAutoUpload.shared.initAutoUpload(viewController: nil) { _ in }
|
|
|
|
|
|
+ NCAutoUpload.shared.initAutoUpload(viewController: nil) { items in
|
|
|
|
+ NKCommon.shared.writeLog("[INFO] Initialize Auto upload with \(items) uploads")
|
|
|
|
+ DispatchQueue.main.async { self.networkingProcessUpload = NCNetworkingProcessUpload() }
|
|
|
|
+ }
|
|
|
|
|
|
// Start services
|
|
// Start services
|
|
NCService.shared.startRequestServicesServer()
|
|
NCService.shared.startRequestServicesServer()
|
|
@@ -333,6 +321,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
|
|
// close detail
|
|
// close detail
|
|
NotificationCenter.default.postOnMainThread(name: NCGlobal.shared.notificationCenterMenuDetailClose)
|
|
NotificationCenter.default.postOnMainThread(name: NCGlobal.shared.notificationCenterMenuDetailClose)
|
|
|
|
|
|
|
|
+ // Reload Widget
|
|
|
|
+ WidgetCenter.shared.reloadAllTimelines()
|
|
|
|
+
|
|
// Registeration domain File Provider
|
|
// Registeration domain File Provider
|
|
// FileProviderDomain *fileProviderDomain = [FileProviderDomain new];
|
|
// FileProviderDomain *fileProviderDomain = [FileProviderDomain new];
|
|
// [fileProviderDomain removeAllDomains];
|
|
// [fileProviderDomain removeAllDomains];
|
|
@@ -341,100 +332,80 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
|
|
|
|
|
|
// MARK: - Background Task
|
|
// MARK: - Background Task
|
|
|
|
|
|
- @available(iOS 13.0, *)
|
|
|
|
|
|
+ /*
|
|
|
|
+ @discussion Schedule a refresh task request to ask that the system launch your app briefly so that you can download data and keep your app's contents up-to-date. The system will fulfill this request intelligently based on system conditions and app usage.
|
|
|
|
+ < MAX 30 seconds >
|
|
|
|
+ */
|
|
func scheduleAppRefresh() {
|
|
func scheduleAppRefresh() {
|
|
|
|
|
|
let request = BGAppRefreshTaskRequest(identifier: NCGlobal.shared.refreshTask)
|
|
let request = BGAppRefreshTaskRequest(identifier: NCGlobal.shared.refreshTask)
|
|
- request.earliestBeginDate = Date(timeIntervalSinceNow: 5 * 60) // Refresh after 5 minutes.
|
|
|
|
|
|
+ request.earliestBeginDate = Date(timeIntervalSinceNow: 60) // Refresh after 60 seconds.
|
|
do {
|
|
do {
|
|
try BGTaskScheduler.shared.submit(request)
|
|
try BGTaskScheduler.shared.submit(request)
|
|
- NCCommunicationCommon.shared.writeLog("Refresh task success submit request \(request)")
|
|
|
|
|
|
+ NKCommon.shared.writeLog("[SUCCESS] Refresh task success submit request 60 seconds \(request)")
|
|
} catch {
|
|
} catch {
|
|
- NCCommunicationCommon.shared.writeLog("Refresh task failed to submit request: \(error)")
|
|
|
|
|
|
+ NKCommon.shared.writeLog("[ERROR] Refresh task failed to submit request: \(error)")
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- @available(iOS 13.0, *)
|
|
|
|
- func scheduleBackgroundProcessing() {
|
|
|
|
|
|
+ /*
|
|
|
|
+ @discussion Schedule a processing task request to ask that the system launch your app when conditions are favorable for battery life to handle deferrable, longer-running processing, such as syncing, database maintenance, or similar tasks. The system will attempt to fulfill this request to the best of its ability within the next two days as long as the user has used your app within the past week.
|
|
|
|
+ < MAX over 1 minute >
|
|
|
|
+ */
|
|
|
|
+ func scheduleAppProcessing() {
|
|
|
|
|
|
let request = BGProcessingTaskRequest(identifier: NCGlobal.shared.processingTask)
|
|
let request = BGProcessingTaskRequest(identifier: NCGlobal.shared.processingTask)
|
|
request.earliestBeginDate = Date(timeIntervalSinceNow: 5 * 60) // Refresh after 5 minutes.
|
|
request.earliestBeginDate = Date(timeIntervalSinceNow: 5 * 60) // Refresh after 5 minutes.
|
|
- request.requiresNetworkConnectivity = true
|
|
|
|
|
|
+ request.requiresNetworkConnectivity = false
|
|
request.requiresExternalPower = false
|
|
request.requiresExternalPower = false
|
|
do {
|
|
do {
|
|
try BGTaskScheduler.shared.submit(request)
|
|
try BGTaskScheduler.shared.submit(request)
|
|
- NCCommunicationCommon.shared.writeLog("Background Processing task success submit request \(request)")
|
|
|
|
|
|
+ NKCommon.shared.writeLog("[SUCCESS] Background Processing task success submit request 5 minutes \(request)")
|
|
} catch {
|
|
} catch {
|
|
- NCCommunicationCommon.shared.writeLog("Background Processing task failed to submit request: \(error)")
|
|
|
|
|
|
+ NKCommon.shared.writeLog("[ERROR] Background Processing task failed to submit request: \(error)")
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- @available(iOS 13.0, *)
|
|
|
|
func handleRefreshTask(_ task: BGTask) {
|
|
func handleRefreshTask(_ task: BGTask) {
|
|
-
|
|
|
|
- if account == "" {
|
|
|
|
|
|
+ scheduleAppRefresh()
|
|
|
|
+
|
|
|
|
+ guard !account.isEmpty else {
|
|
task.setTaskCompleted(success: true)
|
|
task.setTaskCompleted(success: true)
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
|
|
- NCCommunicationCommon.shared.writeLog("Start handler refresh task [Auto upload]")
|
|
|
|
-
|
|
|
|
- NCAutoUpload.shared.initAutoUpload(viewController: nil) { _ in
|
|
|
|
- DispatchQueue.main.asyncAfter(deadline: .now() + 5) {
|
|
|
|
- NCCommunicationCommon.shared.writeLog("Completition handler refresh task with [Auto upload]")
|
|
|
|
- task.setTaskCompleted(success: true)
|
|
|
|
- }
|
|
|
|
|
|
+ NKCommon.shared.setup(delegate: NCNetworking.shared)
|
|
|
|
+ NKCommon.shared.writeLog("[INFO] Start handler refresh task [Auto upload]")
|
|
|
|
+
|
|
|
|
+ NCAutoUpload.shared.initAutoUpload(viewController: nil) { items in
|
|
|
|
+ NKCommon.shared.writeLog("[INFO] Completition handler refresh task [Auto upload] with \(items) uploads")
|
|
|
|
+ task.setTaskCompleted(success: true)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- @available(iOS 13.0, *)
|
|
|
|
func handleProcessingTask(_ task: BGTask) {
|
|
func handleProcessingTask(_ task: BGTask) {
|
|
-
|
|
|
|
- if account == "" {
|
|
|
|
|
|
+ scheduleAppProcessing()
|
|
|
|
+
|
|
|
|
+ guard !account.isEmpty else {
|
|
task.setTaskCompleted(success: true)
|
|
task.setTaskCompleted(success: true)
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
|
|
- NCCommunicationCommon.shared.writeLog("Start handler processing task [Synchronize Favorite & Offline]")
|
|
|
|
-
|
|
|
|
- NCNetworking.shared.listingFavoritescompletion(selector: NCGlobal.shared.selectorReadFile) { _, _, errorCode, _ in
|
|
|
|
- NCCommunicationCommon.shared.writeLog("Completition listing favorite with error: \(errorCode)")
|
|
|
|
- }
|
|
|
|
|
|
+ NKCommon.shared.setup(delegate: NCNetworking.shared)
|
|
|
|
+ NKCommon.shared.writeLog("[INFO] Start handler processing task [Reload widget]")
|
|
|
|
|
|
- NCService.shared.synchronizeOffline(account: account)
|
|
|
|
|
|
+ WidgetCenter.shared.reloadAllTimelines()
|
|
|
|
|
|
- DispatchQueue.main.asyncAfter(deadline: .now() + 25) {
|
|
|
|
- NCCommunicationCommon.shared.writeLog("Completition handler processing task [Synchronize Favorite & Offline]")
|
|
|
|
- task.setTaskCompleted(success: true)
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- // MARK: - Fetch
|
|
|
|
-
|
|
|
|
- func application(_ application: UIApplication, performFetchWithCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) {
|
|
|
|
-
|
|
|
|
- if account == "" {
|
|
|
|
- completionHandler(UIBackgroundFetchResult.noData)
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- NCCommunicationCommon.shared.writeLog("Start perform Fetch [Auto upload]")
|
|
|
|
-
|
|
|
|
- NCAutoUpload.shared.initAutoUpload(viewController: nil) { items in
|
|
|
|
- NCCommunicationCommon.shared.writeLog("Completition perform Fetch with \(items) uploads [Auto upload]")
|
|
|
|
- if items == 0 {
|
|
|
|
- completionHandler(UIBackgroundFetchResult.noData)
|
|
|
|
- } else {
|
|
|
|
- completionHandler(UIBackgroundFetchResult.newData)
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ task.setTaskCompleted(success: true)
|
|
}
|
|
}
|
|
|
|
|
|
// MARK: - Background Networking Session
|
|
// MARK: - Background Networking Session
|
|
|
|
|
|
func application(_ application: UIApplication, handleEventsForBackgroundURLSession identifier: String, completionHandler: @escaping () -> Void) {
|
|
func application(_ application: UIApplication, handleEventsForBackgroundURLSession identifier: String, completionHandler: @escaping () -> Void) {
|
|
|
|
|
|
- NCCommunicationCommon.shared.writeLog("Start handle Events For Background URLSession: \(identifier)")
|
|
|
|
|
|
+ NKCommon.shared.writeLog("[INFO] Start handle Events For Background URLSession: \(identifier)")
|
|
|
|
+ // Reload Widget
|
|
|
|
+ WidgetCenter.shared.reloadAllTimelines()
|
|
backgroundSessionCompletionHandler = completionHandler
|
|
backgroundSessionCompletionHandler = completionHandler
|
|
}
|
|
}
|
|
|
|
|
|
@@ -449,8 +420,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
|
|
}
|
|
}
|
|
|
|
|
|
func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
|
|
func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
|
|
- NCNetworking.shared.checkPushNotificationServerProxyCertificateUntrusted(viewController: self.window?.rootViewController) { errorCode in
|
|
|
|
- if errorCode == 0 {
|
|
|
|
|
|
+ NCNetworking.shared.checkPushNotificationServerProxyCertificateUntrusted(viewController: self.window?.rootViewController) { error in
|
|
|
|
+ if error == .success {
|
|
NCPushNotification.shared().registerForRemoteNotifications(withDeviceToken: deviceToken)
|
|
NCPushNotification.shared().registerForRemoteNotifications(withDeviceToken: deviceToken)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -466,18 +437,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
|
|
|
|
|
|
@objc func openLogin(viewController: UIViewController?, selector: Int, openLoginWeb: Bool) {
|
|
@objc func openLogin(viewController: UIViewController?, selector: Int, openLoginWeb: Bool) {
|
|
|
|
|
|
- // use appConfig [MDM]
|
|
|
|
- if NCBrandOptions.shared.use_configuration {
|
|
|
|
-
|
|
|
|
- if activeAppConfigView?.view.window == nil {
|
|
|
|
- activeAppConfigView = UIStoryboard(name: "NCLogin", bundle: nil).instantiateViewController(withIdentifier: "NCAppConfigView") as? NCAppConfigView
|
|
|
|
- showLoginViewController(activeAppConfigView, contextViewController: viewController)
|
|
|
|
- }
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- // only for personalized LoginWeb [customer]
|
|
|
|
- if NCBrandOptions.shared.use_login_web_personalized {
|
|
|
|
|
|
+ // [WEBPersonalized] [AppConfig]
|
|
|
|
+ if NCBrandOptions.shared.use_login_web_personalized || NCBrandOptions.shared.use_AppConfig {
|
|
|
|
|
|
if activeLoginWeb?.view.window == nil {
|
|
if activeLoginWeb?.view.window == nil {
|
|
activeLoginWeb = UIStoryboard(name: "NCLogin", bundle: nil).instantiateViewController(withIdentifier: "NCLoginWeb") as? NCLoginWeb
|
|
activeLoginWeb = UIStoryboard(name: "NCLogin", bundle: nil).instantiateViewController(withIdentifier: "NCLoginWeb") as? NCLoginWeb
|
|
@@ -576,19 +537,19 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
|
|
|
|
|
|
let certificateHostSavedPath = CCUtility.getDirectoryCerificates()! + "/" + host + ".der"
|
|
let certificateHostSavedPath = CCUtility.getDirectoryCerificates()! + "/" + host + ".der"
|
|
var title = NSLocalizedString("_ssl_certificate_changed_", comment: "")
|
|
var title = NSLocalizedString("_ssl_certificate_changed_", comment: "")
|
|
-
|
|
|
|
|
|
+
|
|
if !FileManager.default.fileExists(atPath: certificateHostSavedPath) {
|
|
if !FileManager.default.fileExists(atPath: certificateHostSavedPath) {
|
|
title = NSLocalizedString("_connect_server_anyway_", comment: "")
|
|
title = NSLocalizedString("_connect_server_anyway_", comment: "")
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
let alertController = UIAlertController(title: title, message: NSLocalizedString("_server_is_trusted_", comment: ""), preferredStyle: .alert)
|
|
let alertController = UIAlertController(title: title, message: NSLocalizedString("_server_is_trusted_", comment: ""), preferredStyle: .alert)
|
|
-
|
|
|
|
|
|
+
|
|
alertController.addAction(UIAlertAction(title: NSLocalizedString("_yes_", comment: ""), style: .default, handler: { action in
|
|
alertController.addAction(UIAlertAction(title: NSLocalizedString("_yes_", comment: ""), style: .default, handler: { action in
|
|
NCNetworking.shared.writeCertificate(host: host)
|
|
NCNetworking.shared.writeCertificate(host: host)
|
|
}))
|
|
}))
|
|
-
|
|
|
|
|
|
+
|
|
alertController.addAction(UIAlertAction(title: NSLocalizedString("_no_", comment: ""), style: .default, handler: { action in }))
|
|
alertController.addAction(UIAlertAction(title: NSLocalizedString("_no_", comment: ""), style: .default, handler: { action in }))
|
|
-
|
|
|
|
|
|
+
|
|
alertController.addAction(UIAlertAction(title: NSLocalizedString("_certificate_details_", comment: ""), style: .default, handler: { action in
|
|
alertController.addAction(UIAlertAction(title: NSLocalizedString("_certificate_details_", comment: ""), style: .default, handler: { action in
|
|
if let navigationController = UIStoryboard(name: "NCViewCertificateDetails", bundle: nil).instantiateInitialViewController() as? UINavigationController {
|
|
if let navigationController = UIStoryboard(name: "NCViewCertificateDetails", bundle: nil).instantiateInitialViewController() as? UINavigationController {
|
|
let viewController = navigationController.topViewController as! NCViewCertificateDetails
|
|
let viewController = navigationController.topViewController as! NCViewCertificateDetails
|
|
@@ -597,7 +558,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
|
|
self.window?.rootViewController?.present(navigationController, animated: true)
|
|
self.window?.rootViewController?.present(navigationController, animated: true)
|
|
}
|
|
}
|
|
}))
|
|
}))
|
|
-
|
|
|
|
|
|
+
|
|
window?.rootViewController?.present(alertController, animated: true)
|
|
window?.rootViewController?.present(alertController, animated: true)
|
|
}
|
|
}
|
|
|
|
|
|
@@ -609,6 +570,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
|
|
|
|
|
|
@objc func settingAccount(_ account: String, urlBase: String, user: String, userId: String, password: String) {
|
|
@objc func settingAccount(_ account: String, urlBase: String, user: String, userId: String, password: String) {
|
|
|
|
|
|
|
|
+ let accountBackup = self.account
|
|
|
|
+ let userIdBackup = self.userId
|
|
|
|
+
|
|
self.account = account
|
|
self.account = account
|
|
self.urlBase = urlBase
|
|
self.urlBase = urlBase
|
|
self.user = user
|
|
self.user = user
|
|
@@ -617,12 +581,18 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
|
|
|
|
|
|
_ = NCFunctionCenter.shared
|
|
_ = NCFunctionCenter.shared
|
|
|
|
|
|
- NCCommunicationCommon.shared.setup(account: account, user: user, userId: userId, password: password, urlBase: urlBase)
|
|
|
|
|
|
+ NKCommon.shared.setup(account: account, user: user, userId: userId, password: password, urlBase: urlBase)
|
|
let serverVersionMajor = NCManageDatabase.shared.getCapabilitiesServerInt(account: account, elements: NCElementsJSON.shared.capabilitiesVersionMajor)
|
|
let serverVersionMajor = NCManageDatabase.shared.getCapabilitiesServerInt(account: account, elements: NCElementsJSON.shared.capabilitiesVersionMajor)
|
|
if serverVersionMajor > 0 {
|
|
if serverVersionMajor > 0 {
|
|
- NCCommunicationCommon.shared.setup(nextcloudVersion: serverVersionMajor)
|
|
|
|
|
|
+ NKCommon.shared.setup(nextcloudVersion: serverVersionMajor)
|
|
}
|
|
}
|
|
NCKTVHTTPCache.shared.restartProxy(user: user, password: password)
|
|
NCKTVHTTPCache.shared.restartProxy(user: user, password: password)
|
|
|
|
+
|
|
|
|
+ DispatchQueue.main.async {
|
|
|
|
+ if UIApplication.shared.applicationState != .background && (accountBackup != account || userIdBackup != userId) {
|
|
|
|
+ NotificationCenter.default.postOnMainThread(name: NCGlobal.shared.notificationCenterInitialize, second: 0.2)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
@objc func deleteAccount(_ account: String, wipe: Bool) {
|
|
@objc func deleteAccount(_ account: String, wipe: Bool) {
|
|
@@ -663,8 +633,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
|
|
NCNetworking.shared.cancelAllTask()
|
|
NCNetworking.shared.cancelAllTask()
|
|
|
|
|
|
settingAccount(tableAccount.account, urlBase: tableAccount.urlBase, user: tableAccount.user, userId: tableAccount.userId, password: CCUtility.getPassword(tableAccount.account))
|
|
settingAccount(tableAccount.account, urlBase: tableAccount.urlBase, user: tableAccount.user, userId: tableAccount.userId, password: CCUtility.getPassword(tableAccount.account))
|
|
-
|
|
|
|
- NotificationCenter.default.postOnMainThread(name: NCGlobal.shared.notificationCenterInitialize)
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -699,7 +667,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
|
|
let popup = NCPopupViewController(contentController: vcAccountRequest, popupWidth: 300, popupHeight: height+20)
|
|
let popup = NCPopupViewController(contentController: vcAccountRequest, popupWidth: 300, popupHeight: height+20)
|
|
popup.backgroundAlpha = 0.8
|
|
popup.backgroundAlpha = 0.8
|
|
|
|
|
|
- UIApplication.shared.keyWindow?.rootViewController?.present(popup, animated: true)
|
|
|
|
|
|
+ window?.rootViewController?.present(popup, animated: true)
|
|
|
|
|
|
vcAccountRequest.startTimer()
|
|
vcAccountRequest.startTimer()
|
|
}
|
|
}
|
|
@@ -814,8 +782,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
|
|
// MARK: - Open URL
|
|
// MARK: - Open URL
|
|
|
|
|
|
func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey: Any] = [:]) -> Bool {
|
|
func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey: Any] = [:]) -> Bool {
|
|
-
|
|
|
|
- if account == "" { return false }
|
|
|
|
|
|
+ guard !account.isEmpty else { return false }
|
|
|
|
|
|
let scheme = url.scheme
|
|
let scheme = url.scheme
|
|
let action = url.host
|
|
let action = url.host
|
|
@@ -823,7 +790,73 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
|
|
var serverUrl: String = ""
|
|
var serverUrl: String = ""
|
|
var matchedAccount: tableAccount?
|
|
var matchedAccount: tableAccount?
|
|
|
|
|
|
- if scheme == "nextcloud" && action == "open-file" {
|
|
|
|
|
|
+ /*
|
|
|
|
+ Example:
|
|
|
|
+ nextcloud://open-action?action=create-voice-memo
|
|
|
|
+ */
|
|
|
|
+
|
|
|
|
+ if scheme == "nextcloud" && action == "open-action" {
|
|
|
|
+
|
|
|
|
+ if let urlComponents = URLComponents(url: url, resolvingAgainstBaseURL: false) {
|
|
|
|
+ let queryItems = urlComponents.queryItems
|
|
|
|
+ guard let actionScheme = CCUtility.value(forKey: "action", fromQueryItems: queryItems), let rootViewController = window?.rootViewController else { return false }
|
|
|
|
+
|
|
|
|
+ switch actionScheme {
|
|
|
|
+ case NCGlobal.shared.actionUploadAsset:
|
|
|
|
+
|
|
|
|
+ NCAskAuthorization.shared.askAuthorizationPhotoLibrary(viewController: rootViewController) { hasPermission in
|
|
|
|
+ if hasPermission {
|
|
|
|
+ NCPhotosPickerViewController.init(viewController: rootViewController, maxSelectedAssets: 0, singleSelectedMode: false)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ case NCGlobal.shared.actionScanDocument:
|
|
|
|
+
|
|
|
|
+ NCCreateScanDocument.shared.openScannerDocument(viewController: rootViewController)
|
|
|
|
+
|
|
|
|
+ case NCGlobal.shared.actionTextDocument:
|
|
|
|
+
|
|
|
|
+ guard let navigationController = UIStoryboard(name: "NCCreateFormUploadDocuments", bundle: nil).instantiateInitialViewController(), let directEditingCreators = NCManageDatabase.shared.getDirectEditingCreators(account: account), let directEditingCreator = directEditingCreators.first(where: { $0.editor == NCGlobal.shared.editorText}) else { return false }
|
|
|
|
+
|
|
|
|
+ navigationController.modalPresentationStyle = UIModalPresentationStyle.formSheet
|
|
|
|
+
|
|
|
|
+ let viewController = (navigationController as! UINavigationController).topViewController as! NCCreateFormUploadDocuments
|
|
|
|
+ viewController.editorId = NCGlobal.shared.editorText
|
|
|
|
+ viewController.creatorId = directEditingCreator.identifier
|
|
|
|
+ viewController.typeTemplate = NCGlobal.shared.templateDocument
|
|
|
|
+ viewController.serverUrl = activeServerUrl
|
|
|
|
+ viewController.titleForm = NSLocalizedString("_create_nextcloudtext_document_", comment: "")
|
|
|
|
+
|
|
|
|
+ rootViewController.present(navigationController, animated: true, completion: nil)
|
|
|
|
+
|
|
|
|
+ case NCGlobal.shared.actionVoiceMemo:
|
|
|
|
+
|
|
|
|
+ NCAskAuthorization.shared.askAuthorizationAudioRecord(viewController: rootViewController) { hasPermission in
|
|
|
|
+ if hasPermission {
|
|
|
|
+ let fileName = CCUtility.createFileNameDate(NSLocalizedString("_voice_memo_filename_", comment: ""), extension: "m4a")!
|
|
|
|
+ let viewController = UIStoryboard(name: "NCAudioRecorderViewController", bundle: nil).instantiateInitialViewController() as! NCAudioRecorderViewController
|
|
|
|
+
|
|
|
|
+ viewController.delegate = self
|
|
|
|
+ viewController.createRecorder(fileName: fileName)
|
|
|
|
+ viewController.modalTransitionStyle = .crossDissolve
|
|
|
|
+ viewController.modalPresentationStyle = UIModalPresentationStyle.overCurrentContext
|
|
|
|
+
|
|
|
|
+ rootViewController.present(viewController, animated: true, completion: nil)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ default:
|
|
|
|
+ print("No action")
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /*
|
|
|
|
+ Example:
|
|
|
|
+ nextcloud://open-file?path=Talk/IMG_0000123.jpg&user=marinofaggiana&link=https://cloud.nextcloud.com/f/123
|
|
|
|
+ */
|
|
|
|
+
|
|
|
|
+ else if scheme == "nextcloud" && action == "open-file" {
|
|
|
|
|
|
if !isSearchingMode, let urlComponents = URLComponents(url: url, resolvingAgainstBaseURL: false) {
|
|
if !isSearchingMode, let urlComponents = URLComponents(url: url, resolvingAgainstBaseURL: false) {
|
|
|
|
|
|
@@ -862,7 +895,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
|
|
}
|
|
}
|
|
|
|
|
|
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
|
|
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
|
|
- NCFunctionCenter.shared.openFileViewInFolder(serverUrl: serverUrl, fileNameBlink: fileName)
|
|
|
|
|
|
+ NCFunctionCenter.shared.openFileViewInFolder(serverUrl: serverUrl, fileNameBlink: nil, fileNameOpen: fileName)
|
|
}
|
|
}
|
|
|
|
|
|
} else {
|
|
} else {
|
|
@@ -880,6 +913,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ } else {
|
|
|
|
+ app.open(url)
|
|
}
|
|
}
|
|
|
|
|
|
return true
|
|
return true
|
|
@@ -908,6 +943,6 @@ extension AppDelegate: NCAudioRecorderViewControllerDelegate {
|
|
extension AppDelegate: NCCreateFormUploadConflictDelegate {
|
|
extension AppDelegate: NCCreateFormUploadConflictDelegate {
|
|
func dismissCreateFormUploadConflict(metadatas: [tableMetadata]?) {
|
|
func dismissCreateFormUploadConflict(metadatas: [tableMetadata]?) {
|
|
guard let metadatas = metadatas, !metadatas.isEmpty else { return }
|
|
guard let metadatas = metadatas, !metadatas.isEmpty else { return }
|
|
- networkingProcessUpload?.createProcessUploads(metadatas: metadatas)
|
|
|
|
|
|
+ networkingProcessUpload?.createProcessUploads(metadatas: metadatas, completion: { _ in })
|
|
}
|
|
}
|
|
}
|
|
}
|