如何在 XCode 4.5 中更改产品名称?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/13713830/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 02:15:00  来源:igfitidea点击:

How to change the product name in XCode 4.5?

iosxcode

提问by Gruntcakes

I have a workspace that contains a library and a project A, I wanted to create a project B which is the same as A except with a few small tweaks. So I copied the entire set of source files for A and make a copy, renamed them to B, then added the B project o the workspace.

我有一个包含库和项目 A 的工作区,我想创建一个与 A 相同的项目 B,只是做了一些小的调整。所以我复制了 A 的整个源文件集并制作了一个副本,将它们重命名为 B,然后将 B 项目添加到工作区。

I've created a new scheme for B but when I build and run the app has A's name.

我为 B 创建了一个新方案,但是当我构建和运行该应用程序时,它的名称为 A。

I was looking at this past question Change product name macro in iOS XCode project

我在看这个过去的问题 Change product name macro in iOS XCode project

but I cannot find a Product Name row in the Packaging setting when using XCode 4.5.2

但是在使用 XCode 4.5.2 时,我在 Packaging 设置中找不到 Product Name 行

回答by Tim Sullivan

Click on the name of the project (the root node) in the sidebar once to select it. Then click it a second time to edit it.

单击侧栏中的项目名称(根节点)一次以选择它。然后再次单击它以对其进行编辑。

enter image description here

在此处输入图片说明

When you press return to save, it will bring up a confirmation dialog that will show you the changes that'll be made.

当您按回车键保存时,它会弹出一个确认对话框,显示将要进行的更改。

You may need to update your developer credentials to support the new app.

您可能需要更新开发者凭据以支持新应用。

Edited to add:

编辑添加:

This should be a caveat at the end of every Xcode-related question: Restart Xcode. It fixes crazy-making problems. :-)

这应该是每个 Xcode 相关问题末尾的警告:重新启动 Xcode。它解决了疯狂的问题。:-)