I want to eject an external disc on my MacBook from my iPhone. I often plug my MacBook into a dock with a Time Machine disc. I want to be able to grab the MacBook off of the dock without logging in to eject the disc. Ideally, I’d tap a shortcut on my iPhone to eject the disc. This seems impossible, but I figure if anybody knows how to do it, I’ll find that person here. Thank you!
You could use Shortcuts to run a terminal command over an SSH connection to your Mac. Hazel triggering might also be an option.
Or you could schedule your Mac to mount and unmount the drive as required depending upon how often time machine is running for you.
You can find info about mounting and unmounting on this article.
I use the SSH technique to eject DVDs from my headless Mac Mini. It works great.