From d681ea81f54b1c73549dce0aceb0d324e42438a9 Mon Sep 17 00:00:00 2001 From: iamgabrielma Date: Wed, 23 Nov 2022 19:57:59 +0900 Subject: [PATCH] Change deprecated kUUTypeUTF8PlainText for UTType --- .../Model/Product/ProductDownloadDragAndDrop.swift | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Networking/Networking/Model/Product/ProductDownloadDragAndDrop.swift b/Networking/Networking/Model/Product/ProductDownloadDragAndDrop.swift index 61b82b3d38e..412419f31e9 100644 --- a/Networking/Networking/Model/Product/ProductDownloadDragAndDrop.swift +++ b/Networking/Networking/Model/Product/ProductDownloadDragAndDrop.swift @@ -1,6 +1,7 @@ import Foundation import CoreServices import Codegen +import UniformTypeIdentifiers /// A wrapper around `ProductDownload`, to make it compatible in using as Drag and Drop data source in a table view. Represents a `ProductDownload` entity. /// To make a data draggable and droppable, on an Table/Collection view, @@ -42,7 +43,7 @@ extension ProductDownloadDragAndDrop: NSItemProviderWriting { /// Gets called by the system to get information about our encoded data representation while Dragging /// public static var writableTypeIdentifiersForItemProvider: [String] { - return [(kUTTypeUTF8PlainText) as String] + [UTType.utf8PlainText.identifier] } public func loadData(withTypeIdentifier typeIdentifier: String, @@ -69,7 +70,7 @@ extension ProductDownloadDragAndDrop: NSItemProviderReading { /// In this case it's kUTTypeUTF8PlainText /// public static var readableTypeIdentifiersForItemProvider: [String] { - return [(kUTTypeUTF8PlainText) as String] + [UTType.utf8PlainText.identifier] } public static func object(withItemProviderData data: Data, typeIdentifier: String) throws -> Self {