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


当前回答

如果您需要在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.

其他回答

我认为这里有一点混乱:

您想更改项目名称还是 你想在iOS仪表板上更改应用程序名称吗?

通常改变后者就足够了,在plist中添加/修改BUNDLE DISPLAY NAME键。

最好保持项目名称不变,但它可能会被更改。

注意,Bundle显示名称可以包含空格和特殊字符,但项目不能。这样做一些cmd行工具将失败,由于文件名路径规则。

甚至可以本地化更多的Bundle Display名称。

因此,除非您处于早期阶段,需要更改内部项目名称,否则请继续使用Bundle Display name键。

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

我看到了很多在主屏幕上更改应用名称的方法,我认为没有必要编辑你的.plist文件或更改目标的构建设置。

在Xcode 7.2中,默认情况下你的plist文件中甚至没有“bundle display name”。

默认情况下,你的'产品名称'在'构建设置'标签的目标是等于$(TARGET_NAME)。恕我直言,这很方便,我并不想改变。

所以你可以像hallski在他的评论中所说的那样简单地改变你的Target名称。我为它画了一张图:

使用目标→构建设置→产品名称。

在目标→构建设置→产品名称字段中,您可以在这里编辑该字段。