1

Writing a Finder extension / Quick Action (see https://developer.apple.com/documentation/appkit/app_extensions/add_functionality_to_finder_with_action_extensions) I happen to have a long-running operation showing "Estimate time remaining...".

Estimate time remaining...

I am able to provide an NSProgress object as result of registerFileRepresentation, but no progress is shown and cancelling is also not working:

itemProvider.registerFileRepresentation(
      forTypeIdentifier: kUTTypePDF as String,
      fileOptions: [.openInPlace],
      visibility: .all,
      loadHandler: {
        completionHandler -> Progress? in
        
        let op = self.newOperation(url: sourceUrl, completionHandler: completionHandler)
        self.queue.addOperation(op)
        return op.progress        
      }
    )

What may I need to do, to get progress being calculated for my NSExtension?

Holtwick
  • 1,849
  • 23
  • 29

0 Answers0