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


当前回答

我在重命名我的iOS项目后使用这个脚本。它有助于更改目录名称并使名称保持同步。

http://github.com/ytbryan/rename

注意:您需要手动更改方案的名称。

其他回答

产品名称($(PRODUCT_NAME)):默认为目标名称。这有助于方案选择正确的目标 Bundle显示名称(CFBundleDisplayName):默认为Product name。这就是显示给iOS用户的内容

如果您需要在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 11中,如果你想改变App的显示名称,你只需要在plist中替换CFBundleDisplayName的值即可:

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

选择项目导航器→选择目标→标识→显示名称→名称。

如果你想改变名称,它会显示在你的屏幕上,就在你的图标下面,在Xcode 4中,点击目标→信息→捆绑显示名称,然后改变它为你想要的任何名称。