My requirement is to run the target file which makes the simulator launch and run the script from the terminal.

I am able to execute the build file successfully from the terminal using (xcodebuild -project MyPro. xcodeproj -target "MyPro copy" -configuration "Debug" -sdk /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk) but the simulator is not getting launched.