I don't think you can do it by GUI of Xcode. You probably need to launch the application from the command line. Which means create a script by any language you know (shell, python, ruby, etc...)
Here is some information: check the link1, and link2, and link3 .