Supplying Launch Arguments for Command-Line Programs

If you look at the main() function in a C, C++, or Objective C program, you will see that main() takes two arguments: argc and argv. Java programs have one argument in main(): args. These arguments let you supply arguments to your program when it launches. If you wrote a program to play an audio file, you could supply the name of the file to play as a launch argument.
When you launch a command-line program from the Terminal application, you type the launch arguments as you launch the program. Xcode lets you run and debug command-line programs inside Xcode so you don't have to run the Terminal application. How do you supply the launch arguments from Xcode?
  1. Select the executable from the Groups and Files list.
  2. Click the Info button in the project window toolbar to open the executable's information panel.
  3. Click the Arguments tab in the information panel.
  4. At the top of the information panel, you will see a section titled Arguments to be passed on launch. This section is where you add the launch arguments. Click the + button to add the arguments.

Changing the Executable Name

When you create an Xcode application project, Xcode uses the project name as the name of the executable file. How do you change the name of the executable file? Change the target's Product Name build setting, which is part of the Packaging collection.
  1. Select the target from the Groups and Files list.
  2. Click the Info button in the project window toolbar to open the target's information panel.
  3. Click the Build tab in the information panel.
  4. Choose Packaging from the Collection pop-up menu.
  5. Enter the desired executable file name as the value for the Product Name build setting.
If you want to change the executable file name for all build configurations, make sure you choose All Configurations from the Configuration pop-up menu when you're changing the executable name. If you want to change the executable name for a single build configuration (Example: adding the word Debug to the executable name for the debug configuration), select that configuration from the Configuration pop-up menu.

Reference:
http://www.meandmark.com/xcodetips.html