TF-2384 Create TwakeCore in ios folder to handle network jmap request to server

Signed-off-by: dab246 <tdvu@linagora.com>
(cherry picked from commit d8a330b987860f133b7e56b4aa67669c9d3c8f20)
This commit is contained in:
dab246
2023-12-24 19:31:03 +07:00
committed by Dat H. Pham
parent 0cd0c24a56
commit edcc30808c
14 changed files with 375 additions and 4 deletions
@@ -63,7 +63,7 @@ class ShareViewController: SLComposeServiceViewController {
}
override func didSelectPost() {
print("didSelectPost");
TwakeLogger.shared.log(message: "didSelectPost");
}
override func configurationItems() -> [Any]! {
@@ -204,7 +204,7 @@ class ShareViewController: SLComposeServiceViewController {
private func dismissWithError() {
print("[ERROR] Error loading data!")
TwakeLogger.shared.log(message: "[ERROR] Error loading data!")
let alert = UIAlertController(title: "Error", message: "Error loading data", preferredStyle: .alert)
let action = UIAlertAction(title: "Error", style: .cancel) { _ in
@@ -275,7 +275,7 @@ class ShareViewController: SLComposeServiceViewController {
}
try FileManager.default.copyItem(at: srcURL, to: dstURL)
} catch (let error) {
print("Cannot copy item at \(srcURL) to \(dstURL): \(error)")
TwakeLogger.shared.log(message: "Cannot copy item at \(srcURL) to \(dstURL): \(error)")
return false
}
return true
@@ -331,7 +331,7 @@ class ShareViewController: SLComposeServiceViewController {
// Debug method to print out SharedMediaFile details in the console
func toString() {
print("[SharedMediaFile] \n\tpath: \(self.path)\n\tthumbnail: \(self.thumbnail)\n\tduration: \(self.duration)\n\ttype: \(self.type)")
TwakeLogger.shared.log(message: "[SharedMediaFile] \n\tpath: \(self.path)\n\tthumbnail: \(self.thumbnail)\n\tduration: \(self.duration)\n\ttype: \(self.type)")
}
}