First off make sure you open settings, go to Privacy and Security, and make sure Allow Applications From is set to "App Store and & Known Developers"
Then try and run it again. It will fail, but then go back to Privacy and Security and you will see an option to run the program anyway