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


当前回答

为了把所有相关信息集中在一个地方,这里是这个问题的官方答案——这是唯一一个在Xcode 5.1.1上对我有效的答案

只需使用Xcode中的标识和类型面板。

其他回答

在Xcode 11中,如果你想改变App的显示名称,你只需要在plist中替换CFBundleDisplayName的值即可:

<key>CFBundleDisplayName</key>
<string>Your App Name</string>

在Xcode中打开目标。 在项目的目标(您当前的开发名称)上构建设置。 在包装下搜索产品名称。将其值更改为您想要的新项目名称。

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

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

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

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

另外:你的目标名称可能与你的应用程序名称相同-注意,改变目标名称不会改变应用程序名称-只有下面描述的目标属性的变化-才会改变应用程序名称。

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