Implementing One-Click Airdrop with Alfred

· 1 min read

Airdrop is an important experience in the Apple ecosystem, conveniently transferring files between devices. However, it’s still not efficient enough - always requiring mouse movement and clicking share->airdrop. In an efficiency-first era, I chose to automate this process.

Current Effect

Select files or links to trigger Airdrop for sharing

Download link: Click here

Usage Notes

  • Need to install dependency library in terminal first: sudo gem install terminal-share

Implementation Foundation

  • AppleScript supports scripted App operations; Apps without direct function support can be automated
    • Complaining that Apple Script official documentation is outdated and unfriendly
  • Mac has built-in sharing tool functions; using third-party terminal-share library for scripting

Current Limitations

Airdrop share window doesn’t stay on top, sometimes making it seem like it didn’t trigger when it’s actually behind the browser

Final Thoughts

Using this workflow can improve efficiency a bit more - nice!