I set up my old laptop as a media server and created a mac application in AppleScript
that would remotely restart or shutdown the mac depending on which button was pressed, using this code:
tell application "Finder" of machine "eppc://USERNAME:PASSWORD@MYSERVER"
shut down
end tell
It's super simple, and was easy to write, but now I want to create an iPad app that can accompany the mac one. Ideally, I'd like to use AppleScript
as, like I said, it's very simple, but I feel like that's not an option.
What are some other ways to do this? Where I would click a button, then it would connect to my mac and either shutdown or restart.
I feel like the best way would be to use SSH
, and right now I'm looking at https://github.com/x2on/libssh2-for-iOS. Any other ideas?