|
@@ -25,9 +25,27 @@ import Foundation
|
|
|
|
|
|
class NCService: NSObject {
|
|
|
|
|
|
+ let appDelegate = UIApplication.shared.delegate as! AppDelegate
|
|
|
+
|
|
|
@objc static let sharedInstance: NCService = {
|
|
|
let instance = NCService()
|
|
|
return instance
|
|
|
}()
|
|
|
|
|
|
+
|
|
|
+ @objc func middlewarePing() {
|
|
|
+
|
|
|
+ if (appDelegate.activeAccount == nil || appDelegate.activeAccount.count == 0 || appDelegate.maintenanceMode == true) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ guard let metadataNet = CCMetadataNet.init(account: appDelegate.activeAccount) else {
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ metadataNet.action = actionMiddlewarePing
|
|
|
+ metadataNet.serverUrl = NCBrandOptions.sharedInstance.middlewarePingUrl
|
|
|
+
|
|
|
+ //appDelegate.addNetworkingOperationQueue(appDelegate.netQueue, delegate: self, metadataNet: metadataNet)
|
|
|
+ }
|
|
|
}
|