Using the following class as an example. Trying to add the new 'Drag and Drop' functionality to an existing Collection View. My model was a 'struct', and I'm trying to change it to a 'class'. Following the WWDC 2017 #227 - Data Delivery with Drag and Drop video, I cannot get the UTI to take.
import MobileCoreServices
class NumberStore1: NSObject, NSItemProviderReading {
var number: String
var isPurged: Int
var isSelected: Int = 0
// next line has error in Xcode: Use of undeclared type 'kUTTypeUTF8PlainText'
static var readableTypeIdentifiersForItemProvider: [kUTTypeUTF8PlainText as String]
required init(itemProviderData data: Data, typeIdentifier: String) throws {
super.init()
}
static func object(withItemProviderData data: Data, typeIdentifier: String) throws -> Self {
}
}
I imported the MobileCoreServices framework, and still cannot get Xcode to accept the type.
Ideas to fix appreciated