Search the Community
Showing results for tags 'AF-2264'.
-
I'm a macOS developer working on integration with Affinity apps using drag and drop. When using the macOS NSFilePromiseProvider api to drag a promised file to a document in any of the Affinity apps they'll crash immediately on drop. It seems like Affinity v2 doesn't handle promised files correctly. See attachment for sample crash report. The issue can be reproduced consistently by dragging from any app that offers file promises without also providing a direct url using `public.file-url`. Examples: Contacts 1. Open a document in Affinity Designer 2. Open macOS Contacts app 3. Drag a contact to the open document => crash ForkLift - https://binarynights.com 1. Connect to a remote location 2. Drag a file from remote to open Affinity document => crash Typeface app - https://typefaceapp.com 1. Drag a font to an open Affinity document => crash Sample Code Project for NSFileProvider See https://developer.apple.com/documentation/appkit/documents_data_and_pasteboard/supporting_drag_and_drop_through_file_promises 1. Build and run 2. Drag image to window 3. Drag image from window to open Affinity document => crash Drag and drop from macOS Photos app works fine, because in addition to a file promise it also offers a url to a file on disk (`public.file-url`) and its contents (`public.jpeg`). That seems to work, but is not possible for apps that deal with data that does not exist locally yet. For my specific use case (Typeface app) it would be great if a file promise of type `public.directory` could be rejected by the Affinity apps, because dropping folders is not supported anyway. This could for example be done by refusing the drop when implementing NSDraggingDestination Possibly related to `af-1162` ? Affinity Designer/Photo/Publisher 2.4.0 macOS Sonoma 14.3 crash.txt