I've been looking for ways to enable drag & drop onto the macOS dock icon. I want to accept .zip and directories. I've been looking for ways to do this, and I found this which doesn't seem to be enough. I've done this before with native macOS apps, but I'm not sure how to do this within the structures of a tauri app. Does anyone have experience with this and can help point me in the right direction?
#Drag & drop onto macOS Dock Icon?
13 messages · Page 1 of 1 (latest)
I'm realizing that if I set CFBundleDocumentTypes in the Info.plist file, the dock icon will accept files/folders. However, it only seems to work in fully built release builds. Any way to make this work in debug builds I run using tauri dev?
I've tried cargo clean/rebuild, etc. I can't seem to get the Info.plist of the application opened via tauri dev to get the new CFBundleDocumentTypes. I'm using the latest RC versions for all dependencies.
Hi, did you ever get this working in dev mode?
I've found this github issue that could fix it but its 3 years old and i dont think it works anymore. Its meant to be that you can put an Info.plist file into src-tauri and it should merge it at runtime but it doesn't seem to work for me at least.
https://github.com/tauri-apps/tauri/issues/1570
I still haven't figured this out for debug builds. And for release builds—while I do get the hover behavior on the dock—I'm not sure where I can add that handler to handle any dropped files onto the dock
i did get that latter part working - i’ll send over the code tomorrow night or it should be on https://www.github.com/dodderss/EngineSimulator as well but i don’t know where
Thank you so much dodders! I'll have a look
no problem. the code for handling the drop is in App.tsx but i’ll document the way i did it properly tomorrow 👍👍👍
@hollow mirage does Dock icon drag & drop work for you in debug builds run from the command line?
Or does it only work when you build for release?