Xcode — Rename Project and Application, Change Copyright and Version Number

After reading the first 6 chapters in Aarons book, I couldn’t wait any longer and had to start writing my own program. I will share a first taste of it here soon. One key problem I soon faced was how to manage multiple versions, i.e., how to save old versions of my program when making major changes. Xcode has no rename functionality, and since an Xcode project comprises many files, the answer is not straightforward. A related problem is that I first started to call my Cocoa Application project by appending the version number. The problem with that is that the Cocoa application by default has the same name and that was awkward. For instance, my current project, a fractal generator, is called “FracGen 0p3”, but I wanted the application to be called only “FracGen” and have the version number appear when selecting the “About” menu item.

To rename an Xcode 2.5 project, do the following:

  1. Close the project in Xcode
  2. Duplicate the project directory in the Finder by pressing Command-D.
  3. Rename the folder
  4. Open the folder and rename the “.xcodeproject” file
  5. Delete the “Build” sub folder, if there is one
  6. Open the renamed .xcodeproject file
  7. On the left in the “Groups&Files” list, expand the “Targets” group, double click on the target that still has your old project filename. Rename it under the “General”-tab in the window that opens.
  8. Select “Clean all targets” from the “Build” menu, keep the boxes checked, and click “Clean”.
  9. Build and run your project.

Now about the second problem:

  1. In Xcode, on the left in the “Groups&Files” list, expand the “Resources” group, and click on “Info.plist”. In the editor on the right you’ll see a lot of entries of this plist file.
  2. Go down to the “CFBundleVersion”-entry and enter your version number, e.g., “0.3”
  3. Next, on the left select “InfoPlist.strings”. In the editor on the right, you’ll see an entry for “NSHumanReadableCopyright”. Enter your information between the quotes, e.g., “(c) Toby Junker, 2008”
  4. Finally, double-click your target (the one you renamed above), select the “Build”-tab in the window that opens, and scroll down until you find “Product Name”. This will have the original name of your “Xcode Project” (before you renamed it). Choose a name w/o version number, e.g., “FracGen”. You will not have to change this again.

These steps sound rather daunting, but are actually very quick to do. I have not yet switched to Leopard, so I don’t know if they work in Xcode 3.0, of if Xcode 3.0 finally has a rename function. The steps given to rename a project have to be executed every time you want to create a new version of your project. The application name and copyright info has to be changed only once. if you want the version to show up correctly in the application’s “About” box, you’ll have to change the plist as explained above.

14 Responses to Xcode — Rename Project and Application, Change Copyright and Version Number

  1. Ruedi Heimlicher

    I followed the above List of action an got strange results. The first project was renamed without problems.
    In another project, I changed also the entry in the info.plist for the key CFBundleExecutable
    The Target and the app in Finder was renamed correctly.
    But when I change the Product Name (4. of the second problem), I get an error: Exited with error 5.
    Naming the Product Name back to the original solves the problem and gives me a renamed app and Project.
    Something I am doing wruong, but what?
    Ruedi Heimlicher

  2. In Xcode 3.1, in addition to the steps described above for the first problem:

    (1) Rename the *_Prefix.pch file as well as the xcodeproj file.

    (2) Having double-clicked on the target to open up the info window, click on the Build tab and change the Product Name and Prefix Header values. [You can either scroll until you see them – they’re in bold – or you can search for the old project name.] You’ll want to do this for both the debug and release configurations.

    That sufficed for me – YMMV, of course…


  3. Thank you very much! Following the instructions on this website I was able to successfully rename my Xcode project! Next time I will think two seconds more about the project name before starting to code 🙂

    Best regards from Germany,


  4. I renamed my project using the method above…adding the extra steps for 3.1 and it runs…however, the name in the Apple bar at the top of the screen still shows the original project name! How can I change that?

  5. One more thing that needs to be done in Xcode 3.1.2:

    Change GCC_PREFIX_HEADER to your new Prefix header

  6. Brilliant. I spent hours previously trying to get this done and your checklist (plus jcb’s advice) took me all of 4 minutes to get right.

  7. Ant1 Vanden

    If you are trying to change the name of the final product (the app) you should simply open the info panel on your app in the target section of your app, then click on the show drop down and select settings defined at this level and there will be a section written product name double click on it and change the name of the app!

  8. I’ve had luck changing the installed file name (the name the user sees) in iPhone development by:

    Projects>Edit Active Target

    and changing the entry for “Product Name” under the “Settings” heading.

  9. Its very nice and easy to proceed… Good one

  10. Alberto Cobas

    XCode 3.2 makes renaming a project a trivial task. Just select the Project entry in the Groups & Files panel, then select the menu Project -> Rename… In the dialog that comes up you have the option to make a snapshot before the rename itself takes place. Worked like a charm on the first try 🙂

  11. alberto: Could you please identify the “Project” entry better. Do you mean under “Targets”? Or the very top level entry in the left hand panel?

  12. Hi,
    I used Project -> Rename.
    As long as you don’t use spaces or illegal characters, it works fine.
    Well, it worked fine for me..if you get any error with the product name, double click on target -> build, change product name to your new product name, works just fine.

  13. Pingback: (X)Code Sharing: The Sunday Programmer Guide - OOgtech.org

Leave a Reply

Your email address will not be published. Required fields are marked *