I cut and pasted that code into a new project, and it worked fine to get to the lockScreen() method (I just have a log statement in there). Try putting a log statement in as the first line in lockScreen() and see if it gets executed. If it does, then the problem is with your do shell script.
In the upper right hand corner of the Xcode window, there are three buttons with “View” written under them. The middle one toggles the display of the console window. But that’s probably not going to help if your build is failing. I didn’t realize you app wasn’t even running.
I am using TechExpertHD´s code in my app. Basically it works but in input or text fields the char that is part of the hotkey combination appears in those input fields. How can I avoid this annoying behavior. E.g. the hotkey alt + cmd + ‘A’ produces an ‘A’. Any hint is appreciated.