Controlling your Mac from your iPhone isn't exactly something new, but it's been pretty limited so far. Blogger Sayz Lim shares a post on controlling all kinds of aspects on your Mac using Keyboard Maestro, IFTTT, Dropbox, Hazel, Drafts and Launch Center Pro.
With a little bit of setup, Lim set up a system where he can remotely quit all apps, wake his screen, put the screen to sleep, and more. Pretty much anything you can do on a Mac with AppleScript can be triggered using this method. In this case, Lim uses Launch Center Pro on his iOS device to trigger an email in IFTTT that alters a file in Dropbox that Hazel monitors then tells Keyboard Maestro to run a macro. It's a little convoluted, but once you get the hang of Lim's system it's easy to start using for yourself. Head over to Lim's site for the full guide.
How to Run Keyboard Maestro Macros Remotely [Sayz Lim]