Change name of iPhone app in Xcode 4
Asked Answered
B

11

108

I want to change the name which is displayed below the app icon on the iPhone screen. I use Xcode 4 and I have one target with keys:

  • Bundle display name : ${PRODUCT_NAME}
  • Bundle name : ${PRODUCT_NAME}

What I want, my project name is for example "test" but I want to have "MySuperApp". So, where can I change it best? Is there a place where I can change ${PRODUCT_NAME}?

Are there any other places where I have to change it?

Boyle answered 18/2, 2011 at 15:23 Comment(1)
possible duplicate of How to change the name of an iPhone app?Dopester
T
176

Answer without file rename

Note that an answer that does not require file rename is below.

Answer with file rename

OK, here is what I found, took me a bit of hunting after reading this post, so hopefully this answer will help everyone:

1.In the project contents pane at left, click the Folder icon.

Folder icon

2.Select the top-level blue line representing the project.

Project icon

3.If you don't have the Inspector pane (right pane) open, click the button to enable it. This is the third button in the "View" toolbar towards the upper right corner.

Third button in "View"

4.In the Inspector pane, click the little folded-corner paper (file properties) icon.

File inspector

5.First thing is Project Name. Type in a new one, you will be prompted to rename project content files.

Project name field

I should add, this will leave your old app with the original name in the simulator, so you still need to delete it from the simulator. Also any files you created in the old app bundle will not be brought forward to the new bundle (unless you find them in Finder and move them over).

(EDIT:) One more important note. Renaming your bundle will mean that the App Bundle Identifier you registered with Apple Provisioning Portal will no longer work for that app. You will need to generate a new App ID and Provisioning Profile in order to distribute your app to a physical device.

Tranquilizer answered 26/4, 2011 at 13:36 Comment(12)
This is the right answer. Not sure why the other one is accepted.Valet
Yes, this was posted just after I switched to XCode 4, and I am so glad I did! It really rocks, blows away MS Visual Studio .NET 2008 (my day job).Tranquilizer
This is not working for me. The File Name field is grayed out (locked). The correct solution for changing the product name is John Friend's solution of deleting the schemes associated to the product.Imprimatur
I'd note that the only thing not changed automatically when you change the projecte name like this in Xcode is the app delegate name. You don't have to change it, but I think it looks weird to have the old name there. I usually go in and rename that manually in Xcode object browser, then change the reference in main.m to your new app delegate filename (and change all references everywhere else including the app delegate .h and .m files).Filch
Joel, I agree. The way I think of it is the first name is the code name for the product, before I had an actual workable product name. Then I got the product name, but the code name hangs around. Kind of like Windows Longhorn became Vista.Tranquilizer
This should be ticked as the correct answer. And to clarify - you will not need a new App ID or Provisioning Profile with this answer.Yeung
This doesn't change the name in the bundle identifier. Anyhow, if this is all you want to do just click on the project target and you can edit the name there. Accomplishes what this does in fewer steps.Bullion
-1,000,000, this answer is wrong and should be deleted. The correct answer is here.Katzen
To be fair, this answer is not wrong, and should not be deleted because this particular solution does enhance the pool of answers and understanding. If you note the edit, I do caution the consequences of this method. It does accomplish both the solution the original poster seeked, plus it provides an answer on how to also change the Bundle Identifier which may prove to be useful. In my situation, I originally named the app a project name, then changed once I established a bundle ID with App Store.Tranquilizer
@Katzen It's not the correct answer, just yet another hack.Gurnard
Can someone clarify why this ("Answer with file rename") is not considered a correct answer when it actually allows XCode to properly set the product name? Directly changing values that are grayed out in Xcode (5.02) seems more problematic to me. Granted there are implications of AppId and rebuilding schemes, but that seems fairly simple to resolve... Of course this is not a good solution if your app is already distributed thru the AppStore, but changing the bundle ID on a distributed app is not a good idea in general.Nonconformance
This worked for me, but required a restart of xcode to see the change.Luanaluanda
G
112

In Xcode 4, select your target, "Info" tab, and set the "Bundle display name" field to the name you want (i.e. "MySuperApp"). This is the simplest, pain-free solution.

All other answers described here do not address the original posted issue: "I want to change the name which is displayed below the app icon on the iPhone screen." The upvoted answers of: Woody, Jay, and youshunei are OK but they will all change the displayed name AND either:

A) change your App Bundle Identifier and cause an incompatibility between your app and the Bundle Identifier you registered with the Apple Provisioning Portal (which is a problem if you have already distributed your app or intend to submit the app)

OR

B) result in scheme issues that others have mentioned (i.e. needing to delete/re-create existing schemes)

Godrich answered 10/11, 2011 at 4:19 Comment(4)
This is the correct solution, unless you're trying to cause unbelievable SVN horror due to renamed files.Retributive
+10000 : this is the only solution that does not cause schem problem nor app store problem nor svn problem nevertheless, it seems you need to uninstall the app for the new bundle name to appear : is that what you experienced ?Supernumerary
@ChristopheBlin On the simulator, that is probably the case (due to Xcode caching). On an actual device, unfortunately I don't recall.Godrich
Changing project_name identifier also tries to change project directory names and so on. So if you want to display characters like "&" in app name, you cannot do this that way.Darrelldarrelle
J
71

Change it in the build tab of the targets settings page

As clarification: select targets, select the target you are building, get info, select the build tab, write 'product name' in the search box, and change it there.

Juniorjuniority answered 18/2, 2011 at 15:26 Comment(6)
As clarification, select targets, select the target you are building, get info, select the build tab, write 'product name' in the search box, and change it thereJuniorjuniority
Works fine here if you do a clean firstJuniorjuniority
Alternatively, you can double-click the target name and change that since the default value of Product name is $(TARGET_NAME).Colombi
In Xcode4 the process is: select Targets and Build Settings. Then type product name in the search box. However, as has been noted, it's easier to just double-click the app under Targets which is what I always end up doing.Yeung
this procedure also changes the bundle identifier so iot is not possible to compile the app without error message.Multifarious
correct procedure would be to change the 'Bundle Display Name' in your YOURAPPNAME-Info.plist which you could find inside the 'Supporting Files'-Folder.Multifarious
E
18

On Xcode 4, you click on TARGETS name 2 times (not doubclick), change name and restart Xcode. It's worked for me, that's simple. enter image description here

Esque answered 17/9, 2011 at 6:49 Comment(2)
I was hoping this would work. Cause it seemed so simple. But doesn't work for xcode 4.5.2Twannatwattle
Doesn't work in Xcode 5 either, without also updating the product name (in the target's build settings tab).Antiperiodic
R
9

You want to change the Bundle Display Name in your project.plist.

Bundle display name : ${PRODUCT_NAME}   

should be changed to

Bundle display name : MySuperApp

This changes the label of the icon in iOS without actually changing the app identifiers. If you just change the bundle display name, you won't need to set up a new app id and provisioning profiles.

Remand answered 24/12, 2011 at 0:42 Comment(0)
P
6

Making the product name change: Double click the name right under "Targets" and modify the target name to whatever you want.

Checking if the change has been made: Click on "Target" and on the right hand side search for "Product Name" under "Build Settings". The displayed value of the product name should reflect your change. If not, double click on that name to make sure it's being set to $(TARGET_NAME).

Pulchritude answered 26/4, 2012 at 21:21 Comment(0)
G
5
  1. Select Project
  2. Select Target and single click to edit and rename and you're done
  3. You can see the product name gets changed

Here the snap for these 3 steps

enter image description here

Edited: I've noticed the similar answer with image attachment by youshunei after my post. So, I would add a bit more information here that I've tested it on Xcode 6.3.2 and it doesn't need any restart.

Edited: When I renamed one of my Mac OS X app which contains comma in its name the same way. I got missing file (name trimmed up-to comma) in some pod linking library. So, I have to rename my app at Target -> Build Settings -> Product Name

Gilreath answered 28/5, 2015 at 20:2 Comment(0)
I
4

To change the name of the app if it has been customized:

Project info -> Targets (click on app icon entry) -> Build Settings -> Product Name

Isomeric answered 13/11, 2011 at 1:51 Comment(0)
H
3

In recent versions of XCode (I am on 4.3.2 currently), $(PRODUCT_NAME) is set to $(TARGET_NAME) which defaults to the name of the project directory (no don't change the directory name).

Solution: Click on the file navigator. Click on your blue project icon. Look for the TARGETS list (under the PROJECT list). Hover-click your target; then rename it to your product name.


Aside: If you are having code-signing problems, I found that deleting, revoking, and regenerating all certificates/keys, and profiles fixed my problem. I tried everything else first!

Horan answered 12/5, 2012 at 4:55 Comment(0)
F
1

One thing that seemed to help when I went through this is in Xcode 4 is that it appeared to be necessary to delete all the schemes. Prior to this it seemed that although the app would be compiled under its new name, it'd be as the old name in the simulator. However, I did do other desperate measures like re-start xcode and delete the app out of the simulator folder so it's hard to be certain that deleting the schemes was the key.

Flask answered 26/5, 2011 at 8:21 Comment(2)
this is the only solution for renaming a product in Xcode 4, that by the way, I hate with passion. I just want Xcode 3 improved back. It is way better.Imprimatur
There must be something in John or Digital's projects that forced that requirement. I have 2 schemes in my project: Debug and Release. Thanks for posting the answer, what works for some may not work for others.Tranquilizer
A
1

The issue I was having was that I have multiple Info.plist files in my Xcode project. In order to ensure I had the right one which contains the Product Name, I moved the existing Info.plist temporarily to force Xcode to allow me to choose another one. Since Info.plist is not part of a target, but part of the Project configuration, this was the only way I could find to do this.

Angelitaangell answered 2/1, 2014 at 19:0 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.