前几天我用一个愚蠢的开发代码开始了一个iPhone项目,现在我想改变这个项目的名称,因为它快要完成了。我该怎么做呢?


当前回答

从Xcode 4.2开始,你可以多使用一个选项。 只需单击左侧导航窗格顶部的.proj文件名,它就可以进行重命名。重命名它,整个项目都会重命名,而不仅仅是目标。

其他回答

在Xcode 13中,如果你想改变应用程序的显示名称,那么只需到plist并简单地替换CFBundleDisplayName的值:使用它你可以显示应用程序的名称。 在.plist文件中,您需要添加这个。

CFBundleDisplayName 你的应用名称

如果您需要在iPhone主屏幕上更改应用程序的名称,则需要在Target配置中进行,而不是在项目配置中进行。

Expand the Targets group in Xcode, and then single-click the item under that. It should share the name of your project, which is also the default name of the application that gets generated. Press Command + I to bring up the Info window, and then navigate to the Build tag. Set the Configuration drop-down to read All Configurations. Look for a setting called Product Name under the Packaging heading. Change that value to the name you want for your compiled applications and, in the immortal words of Bugs Bunny: Voilà! Do a clean and a build. Your application will take on the new name.

选择左边最上面的一行(包含项目名称、目标数量等)。 选择要重命名的目标。 再次单击目标的名称。 键入新名称。 按回车。

在Xcode 4中,在目标的“Build Settings”标签下搜索“Product Name”。

在新版本的Xcode (Xcode 5也是)中,要更改项目名称,请遵循以下简单(尽可能详细)的步骤:

注意:在这个例子中,我将把一个假设的“样本”名称改为“测试”名称。

Click twice slowly on the project root in the project navigator and then it becomes editable. Rename the project. After pressing Enter the assistant will suggest you to automatically change all project-name-related entries and will allow you to de-select some of them, if you want. Press 'RENAME' and Xcode will do the rest. In the meanwhile Xcode may ask you about the option of making a snapshot of the project (it is very recommendable to do so). In addition to renaming the project, you may want to rename the scheme so that it matches your new project name. Repeat similar steps like 1 and 2, and press OK. That's it.

另一个场景…

前面的解释与更改项目名称有关,但您可能只需要更改主屏幕应用程序图标下方的显示名称。以下是步骤:

在“支持文件”组中找到信息。Plist(或相关)文件 找到“Bundle display name”键并将值更改为新名称。 从模拟器或任何其他测试设备中删除“旧”应用程序。 再次清理并重新构建应用程序。 就是这样。现在你将在主屏幕上看到新的应用程序名称。