title: Argument type 'customClass.Type' does not conform to expected type 'NSItemProviderWriting'
body: <p>iOS 11.x Swift 4</p>
  
  <p>Trying to implement a custom class for using the new drop and drag protocol and need some super-coder help. I created this class.</p>
  
  <pre><code>import UIKit
  import MobileCoreServices
  
  class CustomClass: NSObject, NSItemProviderWriting, NSItemProviderReading {
  
  var image2D:Data?
  
  static var readableTypeIdentifiersForItemProvider = [kUTTypeData as String]
  
  static func object(withItemProviderData data: Data, typeIdentifier: String) throws -&gt; Self {
      return try self.init(itemProviderData: data, typeidentifier: kUTTypeData as String)
  }
  
  required init(itemProviderData data: Data, typeidentifier: String) throws {
      super.init() 
      image2D = data
  }
  
  static var writableTypeIdentifiersForItemProvider = [kUTTypeData as String]
  
  func loadData(withTypeIdentifier typeIdentifier: String, forItemProviderCompletionHandler completionHandler: @escaping (Data?, Error?) -&gt; Void) -&gt; Progress? {
      let data2E = image2D
      completionHandler(data2E, nil)
      return nil
  }
  
  }
  </code></pre>
  
  <p>It compiles, looks ok? Then I reference it with this call.</p>
  
  <pre><code>func dragInteraction(_ interaction: UIDragInteraction, itemsForBeginning session: UIDragSession) -&gt; [UIDragItem] {
           let itemProvider = NSItemProvider(object: CustomClass)
          let dragItem = UIDragItem(itemProvider: itemProvider)
          return [dragItem]
      }
  </code></pre>
  
  <p>And I got the error message ... Argument type 'CustomClass.Type' does not conform to expected type 'NSItemProviderWriting'...</p>
  
  <p>But beyond that cannot seem to find any more clues here, there or anywhere as to how to move forward on this.</p>
  
  <p>A side point I implemented one of these guys, it worked...</p>
  
  <pre><code>  itemProvider.registerDataRepresentation(forTypeIdentifier: kUTTypeJPEG as String, visibility: .all)
  </code></pre>
  
  <p>And I implemented one of these guys, it worked too...</p>
  
  <pre><code>itemProvider.registerFileRepresentation(forTypeIdentifier: kUTTypeJPEG as String, fileOptions: [.openInPlace], visibility: .all)
  </code></pre>
  
  <p>So I am thinking, the code cannot be THAT wrong... surely...</p>