Jump to content

NSFilePromises - Drag And Drop


Recommended Posts

Hi, I've built a Mac OS Cocoa app that in the past allowed me to drag directly form my app to an evernote notebook. With the latest OS versions however, the Apple API used for this was deprecated and the new version no longer allows for this behavior. The new API method is 'func filePromiseProvider(_ filePromiseProvider: NSFilePromiseProvider, writePromiseTo url: URL, completionHandler: @escaping (Error?) -> Void)' of delegate 'NSFilePromiseProviderDelegate'. 

I was speaking with a few people and they were under the belief that Evernote does not have this File Promises functionality enabled, but if it was enabled the drop would be successful. Again, this used to work with OS versions 10.13 and prior. But with 10.14 this old method was deprecated so the drop is no longer successful. 

Can anyone offer any assistance with this or help perhaps coordinating with evernote to add this File Promises functionality? Evernote is not the only app affected by this, but it's the most important one to me to get back up and running.

Old Deprecated Method (That worked)

func namesOfPromisedFilesDropped(atDestination dropDestination: URL) -> [String]?

New Method (Does not work)

func filePromiseProvider(_ filePromiseProvider: NSFilePromiseProvider, writePromiseTo url: URL, completionHandler: @escaping (Error?) -> Void)

 

Incidentally, even using the Apple provided sample code this does not work. Apples File Promises sample code is located here: Apple - File Promises Sample App

StackOverflow Post: StackOverflow - File Promises

Apple Support: Apple Support - File Promises

 

Thank you! 

Jim

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...