简体   繁体   English

如何在 Xcode 8 中更改应用程序显示名称以添加空格

[英]How to change app display name in Xcode 8 to add a space

I am trying to put a space in my app name (standalone sticker pack) in Xcode 8. The solutions I've seen on here are to change the Product Name (in packaging) or to change the "Bundle Display Name".我试图在 Xcode 8 中的应用程序名称(独立贴纸包)中放置一个空格。我在这里看到的解决方案是更改产品名称(在包装中)或更改“捆绑显示名称”。

I've changed the product name and that hasn't worked (I cleaned, rebuilt, reset content and settings in simulator and logged out of xcode, logged back in and rebuilt app).我已经更改了产品名称,但没有奏效(我在模拟器中清理、重建、重置内容和设置并注销 xcode,重新登录并重建应用程序)。

I can't see "Bundle Display Name" anywhere.我在任何地方都看不到“捆绑显示名称”。 Should I add it and if so, how do I do that?我应该添加它,如果是,我该怎么做?

I've read the thread How to change the name of an iOS app?我已阅读主题如何更改 iOS 应用程序的名称? and done the suggestions, but it's still showing in simulator and testflight without the space.并完成了建议,但它仍然在没有空间的模拟器和试飞中显示。 Have I missed something?我错过了什么吗?

Steps:步骤:

1. Open project Info . 1.打开项目Info

2. Add a property Bundle display name into Custom iOS Target Properties . 2.将属性Bundle display name添加到Custom iOS Target Properties (as "Key") (作为“钥匙”)

3 . 3 . Enter the display name, that will be shown on iPhone/iPad screen under an app icon.输入显示名称,该名称将显示在 iPhone/iPad 屏幕上的应用程序图标下。 (as "Value") (作为“价值”)

It's my solution that works properly.这是我的解决方案正常工作。 Also you should delete previously installed app and reinstall it.此外,您应该删除以前安装的应用程序并重新安装。解决方案

Just go to Target -> General -> In Identity -> Display Name .只需转到Target -> General -> In Identity -> Display Name By default, it has your app display name which is unhighlighted.默认情况下,它具有未突出显示的应用显示名称。 Enter here your new app display name.在此处输入您的新应用显示名称。

在此处输入图片说明

There are two ways to change app display name.有两种方法可以更改应用程序显示名称。

Solution 1:解决方案1:

Goto Targets -> General Tab -> Identity section转到Targets -> General选项卡 -> Identity部分

In this you'll find Display Name field where you set app display name.在此您将找到Display Name字段,您可以在其中设置应用程序显示名称。

截图 1

Solution 2:解决方案2:

Bundle Display Name property is not present by default in Info.plist.默认情况下,Info.plist 中不存在Bundle Display Name属性。 You need to explicitly add this property.您需要显式添加此属性。

Below image shows how to add this property.下图显示了如何添加此属性。

截图 2

Note: If still this new name is not reflected in your app then delete app and install it again.注意:如果这个新名称仍然没有反映在您的应用程序中,请删除应用程序并重新安装。

When creating a new project, Xcode uses the Product Name by default.创建新项目时,Xcode 默认使用产品名称 You can just change that in your Build Settings, even setting separate names for your schemes.您可以在 Build Settings 中更改它,甚至为您的方案设置单独的名称。

在此处输入图片说明

After changed Bundle display name make a Clean of project.更改 Bundle 显示名称后,对项目进行清理。

在此处输入图片说明

  1. Change the Bundle Display Name (CFBundleDisplayName) in your Info.plist file更改 Info.plist 文件中的Bundle Display Name (CFBundleDisplayName)
  2. Check if you have any localization (InfoPlist.strings) files, and change the corresponding CFBundleDisplayName values in those files to the localized values.检查您是否有任何本地化 (InfoPlist.strings) 文件,并将这些文件中相应的CFBundleDisplayName值更改为本地化值。
  3. That's it.就是这样。

转到 Info.plist 并添加“Bundle display name”并在值框中设置重命名,确保 Bundle display name type 是一个字符串,自动运行项目,它将被更改

For xcode 9.3, Goto Targets, Build Settings, under packaging change Produce Name.对于 xcode 9.3,Goto Targets,Build Settings,在打包下更改 Produce Name。 See below screen shot请参阅下面的屏幕截图

在此处输入图片说明

After this if it not changed, clean product to reopen X code.在此之后,如果它没有改变,请清洁产品以重新打开 X 代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM