Skip to content

Commit bc2ae95

Browse files
authored
Merge pull request #8188 from woocommerce/task/deprecated-kUTTypeUTF8PlainText
Change deprecated kUUTypeUTF8PlainText for UTType
2 parents a3c0df6 + d681ea8 commit bc2ae95

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Networking/Networking/Model/Product/ProductDownloadDragAndDrop.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import Foundation
22
import CoreServices
33
import Codegen
4+
import UniformTypeIdentifiers
45

56
/// A wrapper around `ProductDownload`, to make it compatible in using as Drag and Drop data source in a table view. Represents a `ProductDownload` entity.
67
/// To make a data draggable and droppable, on an Table/Collection view,
@@ -42,7 +43,7 @@ extension ProductDownloadDragAndDrop: NSItemProviderWriting {
4243
/// Gets called by the system to get information about our encoded data representation while Dragging
4344
///
4445
public static var writableTypeIdentifiersForItemProvider: [String] {
45-
return [(kUTTypeUTF8PlainText) as String]
46+
[UTType.utf8PlainText.identifier]
4647
}
4748

4849
public func loadData(withTypeIdentifier typeIdentifier: String,
@@ -69,7 +70,7 @@ extension ProductDownloadDragAndDrop: NSItemProviderReading {
6970
/// In this case it's kUTTypeUTF8PlainText
7071
///
7172
public static var readableTypeIdentifiersForItemProvider: [String] {
72-
return [(kUTTypeUTF8PlainText) as String]
73+
[UTType.utf8PlainText.identifier]
7374
}
7475

7576
public static func object(withItemProviderData data: Data, typeIdentifier: String) throws -> Self {

0 commit comments

Comments
 (0)