如何更改 iOS 应用程序的名称?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/238980/
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-08-30 15:20:56  来源:igfitidea点击:

How to change the name of an iOS app?

iosxcode

提问by Robert Gould

I began an iPhone project the other day with a silly development code name, and now I want to change the name of the project since it's nearly finished.

前几天我用一个愚蠢的开发代号开始了一个 iPhone 项目,现在我想更改项目的名称,因为它快完成了。

But I'm not sure how to do this with Xcode, trying the obvious of changing the application's name in the info.plist file, causes the signing process to go wrong (I think...) and my app won't launch giving me a Launcher error.

但是我不确定如何使用 Xcode 执行此操作,尝试在 info.plist 文件中更改应用程序名称的明显方法,导致签名过程出错(我认为...)并且我的应用程序不会启动我一个启动器错误。

I guess I could make a new project and copy paste everything over, but it seems so primitive that I'm hoping for a more civilized solution.

我想我可以创建一个新项目并将所有内容复制粘贴,但这似乎太原始了,我希望有一个更文明的解决方案。

回答by Giao

  1. Go to Targetsin Xcode
  2. Get Infoon your project's target (your current development name)
  3. Search for Product Nameunder Packaging. Change the value of what you want the your new project name to be.
  1. 转到TargetsXcode
  2. Get Info在您项目的目标上(您当前的开发名称)
  3. Product Name下搜索Packaging。更改您希望新项目名称的值。

回答by Javier Cadiz

In new versions of Xcode (Xcode 5 too) to change the name of the project follow this simple (detailed as possible) steps:

在新版本的 Xcode(也有Xcode 5)中,按照这个简单(尽可能详细)的步骤更改项目名称:

Note:In this example I'll change a hypothetical "Sample" name to a "Test" one.

注意:在本例中,我将假设的“Sample”名称更改为“Test”名称。

  1. Click twice slowlyon the project root in the project navigator and then it becomes editable.

    enter image description here

  2. Rename the project.

    enter image description here

  3. After pressing 'ENTER' the assistant will suggest you to automatically change all project-name-related entries and will allow you to de-select some of them, if you want.

    enter image description here

  4. Press 'RENAME' and Xcode will do the rest. In the meanwhile Xcode may ask you about the option of making a snapshot of the project (it is very recommendable to do so).

  5. In addition to renaming the project, you may want to rename the scheme so that it matches your new project name.

    enter image description here

  6. Repeat similar steps like 1 and 2, and press OK.

    enter image description hereenter image description here

  7. That's it.

  1. 在项目导航器中的项目根目录上缓慢单击两次,然后它变得可编辑。

    在此处输入图片说明

  2. 重命名项目。

    在此处输入图片说明

  3. 按“ENTER”后,助手会建议您自动更改所有与项目名称相关的条目,并允许您根据需要取消选择其中的一些条目。

    在此处输入图片说明

  4. 按“重命名”,Xcode 将完成剩下的工作。同时 Xcode 可能会询问您是否可以选择制作项目快照(非常推荐这样做)。

  5. 除了重命名项目之外,您可能还想重命名方案,使其与您的新项目名称相匹配。

    在此处输入图片说明

  6. 重复类似的步骤 1 和 2,然后按 OK。

    在此处输入图片说明在此处输入图片说明

  7. 就是这样。

Another scenario ...The previous explanation was related to changing the project name, but chances are that you only need to change the display name that appears below the app icon in the home screen. These are the steps:

另一种情况......之前的解释与更改项目名称有关,但您可能只需要更改主屏幕中应用程序图标下方显示的显示名称。这些是步骤:

  1. In the "Supporting Files" group locate the info.plist (or related) file

  2. Locate the "Bundle display name" key and change the value to the new name.

    enter image description here

    enter image description here

  3. Delete the "old" app from the simulator or any other testing device.

  4. Clean and Rebuild your app again.

  5. That's it, you will now see the new app name in your home screen.

  1. 在“支持文件”组中找到 info.plist(或相关)文件

  2. 找到“Bundle display name”键并将值更改为新名称。

    在此处输入图片说明

    在此处输入图片说明

  3. 从模拟器或任何其他测试设备中删除“旧”应用程序。

  4. 再次清理并重建您的应用程序。

  5. 就是这样,您现在将在主屏幕中看到新的应用程序名称。

回答by Atma

You change the bundle display name in the info.plist. It's as simple as that.

您在 info.plist 中更改包显示名称。就这么简单。

Changing the 'bundle display name' (as opposed to 'bundle name') is the only way to include characters like '+' in your applications name. Including special characters in the project name will cause an error when uploading to the app store!

更改“捆绑显示名称”(与“捆绑名称”相反)是在应用程序名称中包含“+”等字符的唯一方法。项目名称中包含特殊字符会导致上传到应用商店时出错!

回答by garageàtrois

In Xcode 4 search for "Product Name" under "Build Settings" tab of the target.

在 Xcode 4 中,在目标的“构建设置”选项卡下搜索“产品名称”。

回答by Alex Cio

1. Select Target

1. 选择目标

enter image description here

在此处输入图片说明

2. Select Info

2. 选择信息

enter image description here

在此处输入图片说明

3. Insert Bundle Display Name and set App Title

3.插入Bundle Display Name并设置App Title

enter image description here

在此处输入图片说明

回答by Dilip Rajkumar

This is how I changed in Xcode 4:

这就是我在 Xcode 4 中的更改方式:

  1. Click on your Target file (First Main file of the application).
  2. Go to Build Settings.
  3. Scroll down you will find a bar called "Packaging".
  4. Under Packaging you will see Product Name, you can change project name.
  1. 单击您的目标文件(应用程序的第一个主文件)。
  2. 转到构建设置。
  3. 向下滚动您会发现一个名为“包装”的栏。
  4. 在 Packaging 下,您将看到 Product Name,您可以更改项目名称。

回答by Kiran Balegar

In Xcode 3.2 just select the Project entry in the Groups & Files panel, then select the menu item Project -> Rename… Worked for me.

在 Xcode 3.2 中,只需在 Groups & Files 面板中选择 Project 条目,然后选择菜单项 Project -> Rename... Worked for me。

回答by Code Hunter

If you want to change display name only then you can directly change from property file(plist) of app.

如果您只想更改显示名称,则可以直接从应用程序的属性文件(plist)更改。

You can add a new row with the following key : bundle display name

您可以使用以下键添加新行:bundle display name

Here is an example for this

这是一个例子

enter image description here

在此处输入图片说明

When you use this the app name which you have given with this key will be display.

当您使用它时,将显示您使用此键指定的应用程序名称。

So you can do this simply.

所以你可以简单地做到这一点。

回答by Dan Rosenstark

Xcode 7/8? It's in the plist that your target uses

Xcode 7/8?它在您的目标使用的 plist 中

enter image description here

在此处输入图片说明

回答by Yogi

From Xcode 4.2 and onwards, you can use one more option. Just click once on .proj file name at the top in left navigation pane and it will be available for renaming.Rename it and the whole project will get renamed and not only the target.

从 Xcode 4.2 起,您可以使用更多选项。只需单击左侧导航窗格顶部的 .proj 文件名,即可对其进行重命名。重命名后,整个项目将被重命名,而不仅仅是目标。