Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -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,
Expand All @@ -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 {
Expand Down