filePromiseProvider and writing to /private/var

I have an application that needs to use filePromiseProvider for drag-and-drop operations to other applications.


The problem I'm having is that the receiving applicaion (in this case, Pages) provides a desired destination in /private/var:


[MSWUtility64 filePromiseProvider:writePromiseToURL:completionHandler:] path:/private/var/folders/yg/gqmcypgs1p9dpyxsllkxt9zc0000gn/T/com.apple.iWork.Pages/com.apple.iWork.Pages_22418__607536614_6/IMG_0067.jpg

Obviously, this is a sandboxed location.


What entitlements need to be set to allow this?

Replies

I am guessing this won't be something you can do in this manner and even if you could, it will probably break in a future update. Have you tried putting the image on the pasteboard and letting Pages get it from the pasteboard?

That works only if the image data is available when the drag and drop operation is initiated. If the image itself resides on a remote server, it might not be available, which is why file promises are the safest route.