Browse Source

new communication library

marinofaggiana 3 years ago
parent
commit
6fc6e99b36

+ 1 - 1
File Provider Extension/FileProviderItem.swift

@@ -44,7 +44,7 @@ class FileProviderItem: NSObject, NSFileProviderItem {
     
     var typeIdentifier: String {
         let results = NCCommunicationCommon.shared.getInternalType(fileName: metadata.fileNameView, mimeType: "", directory: metadata.directory)
-        return results.uniformTypeIdentifier
+        return results.typeIdentifier
     }
     
     var contentModificationDate: Date? {

+ 1 - 1
Nextcloud.xcodeproj/project.pbxproj

@@ -2913,7 +2913,7 @@
 			repositoryURL = "https://github.com/nextcloud/ios-communication-library/";
 			requirement = {
 				kind = revision;
-				revision = e45c8a1f224d6bedbdf4318e3cba18f3ab05fae3;
+				revision = 4f20d47b683ba87898ad1913ecda48128bdcca4b;
 			};
 		};
 		F788ECC5263AAAF900ADC67F /* XCRemoteSwiftPackageReference "MarkdownKit" */ = {

+ 1 - 1
Nextcloud.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

@@ -105,7 +105,7 @@
         "repositoryURL": "https://github.com/nextcloud/ios-communication-library/",
         "state": {
           "branch": null,
-          "revision": "e45c8a1f224d6bedbdf4318e3cba18f3ab05fae3",
+          "revision": "4f20d47b683ba87898ad1913ecda48128bdcca4b",
           "version": null
         }
       },

+ 1 - 1
iOSClient/Main/NCFunctionCenter.swift

@@ -447,7 +447,7 @@ import Queuer
             guard let data = data else { return false}
             guard let pasteboardType = pasteboardType else { return false }
             
-            let results = NCCommunicationCommon.shared.getDescriptionFile(inUTI: pasteboardType as CFString)
+            let results = NCCommunicationCommon.shared.getFileProperties(inUTI: pasteboardType as CFString)
             if results.ext == "" { return false }
             if results.classFile != NCCommunicationCommon.typeClassFile.unknow.rawValue {
                 

+ 2 - 2
iOSClient/Networking/NCService.swift

@@ -230,13 +230,13 @@ class NCService: NSObject {
                     // Added UTI for Collabora
                     if let richdocumentsMimetypes = NCManageDatabase.shared.getCapabilitiesServerArray(account: account, elements: NCElementsJSON.shared.capabilitiesRichdocumentsMimetypes) {
                         for mimeType in richdocumentsMimetypes {
-                            NCCommunicationCommon.shared.addInternalUTI(UTIString: mimeType, classFile:  NCCommunicationCommon.typeClassFile.document.rawValue, iconName: NCCommunicationCommon.typeIconFile.document.rawValue, name: "document")
+                            NCCommunicationCommon.shared.addInternalTypeIdentifier(typeIdentifier: mimeType, classFile:  NCCommunicationCommon.typeClassFile.document.rawValue, iconName: NCCommunicationCommon.typeIconFile.document.rawValue, name: "document")
                         }
                     }
                     // Added UTI for ONLYOFFICE & Text
                     if let directEditingCreators = NCManageDatabase.shared.getDirectEditingCreators(account: account) {
                         for directEditing in directEditingCreators {
-                            NCCommunicationCommon.shared.addInternalUTI(UTIString: directEditing.mimetype, classFile:  NCCommunicationCommon.typeClassFile.document.rawValue, iconName: NCCommunicationCommon.typeIconFile.document.rawValue, name: "document")
+                            NCCommunicationCommon.shared.addInternalTypeIdentifier(typeIdentifier: directEditing.mimetype, classFile:  NCCommunicationCommon.typeClassFile.document.rawValue, iconName: NCCommunicationCommon.typeIconFile.document.rawValue, name: "document")
                         }
                     }