Jump to content

Adding AirDrop Support to Alfred


Recommended Posts

This workflow allows you to invoke AirDrop in Alfred by typing airdrop.

open_airdrop.thumb.png.6e9c72eacbb4f1e4cf79f98499531926.png

Compared to hackish solutions that require AppleScript such as this and this, this simply executes airdrop.app directly, giving you the same experience as what you'd get when you type airdrop in Spotlight, e.g. it won't create duplicates if you already have one or more AirDrop windows or tabs opened, and lauching AirDrop won't bring all Finder windows to the front.

 

I'm actually a bit curious about why Alfred couldn't find airdrop.app after I added /System/Library/CoreServices/Finder.app/Contents/Applications/ to search scope. Until that works in Alfred, this is probably the best solution.

 

Download the workflow at Packal!

Edited by Safari
Link to comment
On 12/30/2019 at 6:52 AM, Safari said:

I'm actually a bit curious about why Alfred couldn't find airdrop.app after I added /System/Library/CoreServices/Finder.app/Contents/Applications/ to search scope.

 

AFAIK, the reason is that the contents of application bundles aren't indexed, so applications within other applications, like Airdrop.app or Alfred Preferences.app, won't show up in a search of the metadata index. They need to be specifically handled as special cases, which Spotlight does for Airdrop.app, but Alfred doesn't. Similarly, you can't launch Alfred Preferences.app via Spotlight.

Edited by deanishe
Link to comment
3 hours ago, deanishe said:

 

AFAIK, the reason is that the contents of application bundles aren't indexed, so applications within other applications, like Airdrop.app or Alfred Preferences.app, won't show up in a search of the metadata index. They need to be specifically handled as special cases, which Spotlight does for Airdrop.app, but Alfred doesn't. Similarly, you can't launch Alfred Preferences.app via Spotlight.

 

Thanks for the explanation! Kind of wish AirDrop was supported natively in Alfred. I spent a whole night trying to write a perfect AppleScript for this before realizing I could just create a workflow to launch the AirDrop app inside Finder :)

Link to comment
  • 6 months later...
On 1/2/2020 at 5:10 PM, lycopodiopsida said:

Hi,

 

nice work! I still wonder, however, whether a workflow could be created which will send a selected file(s) with file action to airdrop.

you can have a try.


Now, it is only simplified, right click=》 share=》airdrop operation

 

https://github.com/alanhg/alfred-workflows/blob/master/airdrop/Airdrop.alfredworkflow

Link to comment
  • 2 weeks later...
On 7/15/2020 at 5:47 AM, Alan He said:

you can have a try.


Now, it is only simplified, right click=》 share=》airdrop operation

 

https://github.com/alanhg/alfred-workflows/blob/master/airdrop/Airdrop.alfredworkflow

Thanks for this. It works for me when selecting files in Finder, but I user Path Finder as a Finder replacement, and it doesn't work with files selected in Path Finder. The Air Drop window simply never opens. Is there a fix?

Link to comment
13 hours ago, JimmyTheSaint said:

Thanks for this. It works for me when selecting files in Finder, but I user Path Finder as a Finder replacement, and it doesn't work with files selected in Path Finder. The Air Drop window simply never opens. Is there a fix?

 

In principle, it depends on the selected file and opens it from finder, even if you select the file in path finder, I tested it and it is OK.

 

 

Link to comment
3 minutes ago, Alan He said:

 

In principle, it depends on the selected file and opens it from finder, even if you select the file in path finder, I tested it and it is OK.

 

 

What's the principle that it depends on? The workflow fails for me on every file I try in Path Finder, and I've tried mp3, text, doc, and pdf files. I select the  Send via AirDrop workflow from the file actions, and nothing happens at all.

Link to comment
9 minutes ago, JimmyTheSaint said:

What's the principle that it depends on? The workflow fails for me on every file I try in Path Finder, and I've tried mp3, text, doc, and pdf files. I select the  Send via AirDrop workflow from the file actions, and nothing happens at all.

you can debug it , and post log-screenshot , like this

 

199481425_ScreenShot2020-07-25at10_33_19.thumb.png.a0576771d814cc35e5fef7ebf3ea0cc0.png

Link to comment

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...