Changing the Application Name for an Xcode Project
Note: I got about 95% finished with this post when I realized it should be on the Xcode Tools Tips page. Because I was almost finished, I decided to also post it on the blog.
When you create an Xcode project, Xcode uses the project name as the title of whatever it builds. If you create an Xcode application project named MyProject, Xcode will create an application named MyProject when you build the project.
Suppose you’re working on your application for a few weeks when you discover the perfect name for your application. You change the name of your project from MyProject to PerfectName, clean your project, and rebuild it. You expect to find an application named PerfectName in your build folder, but the application is still called MyProject. How do you get Xcode to build the project so the application name is PerfectName?
The answer is to modify the Product Name build setting, which you can find in the Packaging build settings collection. Product Name is the name of what Xcode builds, such as an application, a framework, or a library. Xcode initially uses the project name as the product name so when you look at the Product Name build setting, it will most likely be blank. Change the value of the Product Name to what you want, which would be PerfectName in this ongoing example.
When you change the Product Name build setting, you’ll want to change it for the target, not a single build configuration. Changing the Product Name build setting for the target makes sure the change takes effect for all build configurations.
This is a nice posting. However, for me it doesn’t work. The app never launches. Any ideas what else I need to do?
Found the answer…
http://www.satimage.fr/software/en/smile/external_codes/projects_xcode_intro.html
In particular: “if you change the Product Name in the Build tab, you must provide the same name for the Executable field in the Properties tab. Otherwise the product may not be launchable.”
Would have been more usefull if you had told also how to find that 'Build tab'. Took me 5 minutes to figure that out as I'm not a regular Xcode user. On Xcode 3.0 you go to Project/Edit Project Settings menu, in the dialog that opens select Build 'tab' from the top, then select from the Show popup: All Settings, then scroll down the list until you see Packaging title under which you should find the empty Product Name property.
br Kusti
I'm using Xcode 3.1.4 and simply double clicking on the Application name beneath the Targets icon, and changing the Product name inside the Debug, Release and (if applicable) Distribution configurations does the trick.
Thanks! Your tip rocks!
You were visited with remarkable idea