如何在Xcode项目中更改产品名称?

时间:2021-09-01 22:57:02

I have an application that I would like to be called IFrames. I've named all of the files appropriately (IFramesAppDelegate, etc.), but when I run it in ad hoc mode it shows up with the name "photoframes" instead.

我有一个应用程序,我想被称为iframe。我已经适当地命名了所有的文件(IFramesAppDelegate等),但是当我以特殊模式运行时,它会显示为“photoframe”。

How did this happen and how do I change the name of the product to match the name I've provided for the project?

这是如何发生的,我如何更改产品的名称以匹配我为项目提供的名称?

7 个解决方案

#1


26  

Do not set the product name on the project level, since your project can build several different applications. For example on iPhone/iPod touch app, and another iPad app fromt he same sources.

不要在项目级别上设置产品名称,因为您的项目可以构建几个不同的应用程序。例如,在iPhone/iPod touch应用程序上,还有另一个来自相同来源的iPad应用程序。

Instead set the product name on the Target. Find the Target in the Group & Files column in Xcode. And select "Get Info" from the context meny, or use the cmd-I shortcut.

而是将产品名称设置在目标上。在Xcode的Group & Files列中找到目标。从上下文菜单中选择“Get Info”,或者使用cmd-I快捷方式。

如何在Xcode项目中更改产品名称?

In the Info window go to the build tab. Make sure Configuration is set to "All Configurations", since you want the same name for Debug and Release builds. Filter down your options with "product name" to find the option fast, and type away.

在Info窗口中,转到build选项卡。请确保将配置设置为“所有配置”,因为您希望对调试和发布构建使用相同的名称。用“产品名称”过滤你的选项以快速找到选项,然后输入。

如何在Xcode项目中更改产品名称?

#2


42  

In XCode 4, on the Target properties, it is under the "Packaging" section, or you can just search for "Product Name".

在XCode 4中,在目标属性上,它位于“打包”部分,或者您可以搜索“产品名称”。

如何在Xcode项目中更改产品名称?

#3


19  

In Xcode 5, the Product Name defaults to the variable $(TARGET_NAME) which is linked to your Target Name.

在Xcode 5中,产品名称默认为变量$(TARGET_NAME),它链接到您的目标名称。

You can change your Target Name by clicking your Project in the Project Navigator, then clicking the target in the list under Targets, and hitting return.

您可以通过单击Project Navigator中的项目来更改目标名称,然后单击Target下的列表中的目标,然后单击return。

#4


4  

This part isn't necessary, but if you rename your project it will sit there annoying you every time you see it (like it did me all this morning)--the scheme name at the top when you compile the project will still have the old name. You can rename it too like this:

这部分不是必需的,但是如果你重命名你的项目,每次你看到它的时候它就会让你烦恼(就像今天早上它对我所做的那样)——在你编译项目时,最上面的方案名仍然会有原来的名字。你也可以这样重命名:

如何在Xcode项目中更改产品名称?

Click the name and select Manage Schemes:

点击名称,选择管理方案:

如何在Xcode项目中更改产品名称?

Click on the name and you can overwrite it:

点击名字,你可以改写它:

如何在Xcode项目中更改产品名称?

#5


2  

You should check all setting/value in the "Project Info" & "Target Info" Pop-up.

您应该检查“项目信息”和“目标信息”弹出框中的所有设置/值。

Another solution, Right-Click on your .xcodeproj, Open the Dir (because it isn't a file), Open all files with text-edit and search/replace what you want :-)

另一个解决方案,右键单击你的.xcodeproj,打开Dir(因为它不是一个文件),使用文本编辑和搜索/替换您想要的所有文件:

Good Luck !

祝你好运!

#6


1  

You can also change the entire project name by just selecting Project->Rename in recent versions of XCode.

您还可以通过在XCode的最新版本中选择project ->重命名来更改整个项目名称。

#7


-1  

Go to Project -> Edit Project Settings -> Select Build tab -> look for productName in packaging category.Change it to what you want.

点击项目->编辑项目设置->选择Build标签->在包装类别中寻找产品名。把它改成你想要的。

Same way Change it in Edit Active Target Settings.

同样的方法可以在编辑活动目标设置中改变它。

#1


26  

Do not set the product name on the project level, since your project can build several different applications. For example on iPhone/iPod touch app, and another iPad app fromt he same sources.

不要在项目级别上设置产品名称,因为您的项目可以构建几个不同的应用程序。例如,在iPhone/iPod touch应用程序上,还有另一个来自相同来源的iPad应用程序。

Instead set the product name on the Target. Find the Target in the Group & Files column in Xcode. And select "Get Info" from the context meny, or use the cmd-I shortcut.

而是将产品名称设置在目标上。在Xcode的Group & Files列中找到目标。从上下文菜单中选择“Get Info”,或者使用cmd-I快捷方式。

如何在Xcode项目中更改产品名称?

In the Info window go to the build tab. Make sure Configuration is set to "All Configurations", since you want the same name for Debug and Release builds. Filter down your options with "product name" to find the option fast, and type away.

在Info窗口中,转到build选项卡。请确保将配置设置为“所有配置”,因为您希望对调试和发布构建使用相同的名称。用“产品名称”过滤你的选项以快速找到选项,然后输入。

如何在Xcode项目中更改产品名称?

#2


42  

In XCode 4, on the Target properties, it is under the "Packaging" section, or you can just search for "Product Name".

在XCode 4中,在目标属性上,它位于“打包”部分,或者您可以搜索“产品名称”。

如何在Xcode项目中更改产品名称?

#3


19  

In Xcode 5, the Product Name defaults to the variable $(TARGET_NAME) which is linked to your Target Name.

在Xcode 5中,产品名称默认为变量$(TARGET_NAME),它链接到您的目标名称。

You can change your Target Name by clicking your Project in the Project Navigator, then clicking the target in the list under Targets, and hitting return.

您可以通过单击Project Navigator中的项目来更改目标名称,然后单击Target下的列表中的目标,然后单击return。

#4


4  

This part isn't necessary, but if you rename your project it will sit there annoying you every time you see it (like it did me all this morning)--the scheme name at the top when you compile the project will still have the old name. You can rename it too like this:

这部分不是必需的,但是如果你重命名你的项目,每次你看到它的时候它就会让你烦恼(就像今天早上它对我所做的那样)——在你编译项目时,最上面的方案名仍然会有原来的名字。你也可以这样重命名:

如何在Xcode项目中更改产品名称?

Click the name and select Manage Schemes:

点击名称,选择管理方案:

如何在Xcode项目中更改产品名称?

Click on the name and you can overwrite it:

点击名字,你可以改写它:

如何在Xcode项目中更改产品名称?

#5


2  

You should check all setting/value in the "Project Info" & "Target Info" Pop-up.

您应该检查“项目信息”和“目标信息”弹出框中的所有设置/值。

Another solution, Right-Click on your .xcodeproj, Open the Dir (because it isn't a file), Open all files with text-edit and search/replace what you want :-)

另一个解决方案,右键单击你的.xcodeproj,打开Dir(因为它不是一个文件),使用文本编辑和搜索/替换您想要的所有文件:

Good Luck !

祝你好运!

#6


1  

You can also change the entire project name by just selecting Project->Rename in recent versions of XCode.

您还可以通过在XCode的最新版本中选择project ->重命名来更改整个项目名称。

#7


-1  

Go to Project -> Edit Project Settings -> Select Build tab -> look for productName in packaging category.Change it to what you want.

点击项目->编辑项目设置->选择Build标签->在包装类别中寻找产品名。把它改成你想要的。

Same way Change it in Edit Active Target Settings.

同样的方法可以在编辑活动目标设置中改变它。