【问题标题】:Space in iOS app name is not showingiOS 应用名称中的空格未显示
【发布时间】:2016-05-31 11:17:17
【问题描述】:

我的捆绑包在 Xcode 中的显示名称是“Standford 2015”,但它在安装时在我的 iPhone 上显示为“Standford2015”。

我做错了什么吗?

【问题讨论】:

  • 你是如何设置包名的? plist 中的哪个属性?
  • plist 中的属性名称是“Bundle display name”,我通过 XCode 将其更改为“Standford 2015”。
  • 我解决了这个问题。见this post

标签: ios


【解决方案1】:

我实际上建议使用  而不是 。后者是一个“图形空间”,与前者相比,它看起来很尴尬,后者只是一个空间。请参阅下面的比较:

【讨论】:

  • 这应该是一个可以接受的答案
  • 不适合我
【解决方案2】:
  1. 将 info.plist 文件作为 SourceCode 打开。
  2. 使用   ;作为 CFBundleDisplayName 中空格的分隔符。

例子

<key>CFBundleDisplayName</key>
<string>App&#x2007;Name</string>

【讨论】:

  • 好像是双倍空格
【解决方案3】:

对于 iOS 11,您可以将 info.plist 作为源代码打开并使用 &amp;#x2007; 而不是空格

【讨论】:

【解决方案4】:

我通过将空格替换为 NB 空格等 unicode 符号解决了这个问题。

我在this post做了一个小说明。

【讨论】:

    【解决方案5】:

    在您本地化的 InfoPlist.string 中不要使用空格,而是使用 unicode 字符“无间断空格”:

    http://www.fileformat.info/info/unicode/char/00a0/index.htm

    所以你在 InfoPlist.string 中的行应该是这样的:

    "CFBundleDisplayName" = "My\U00A0app";

    【讨论】:

    • 在 InfoPlist.strings 中,使用字符 \U2007(“数字空间”)而不是“不间断空间”。
    【解决方案6】:

    可能的解决方法:使用带有内容的可本地化 InfoPlist.strings 文件:

    /* Localized versions of Info.plist keys */
    "CFBundleDisplayName" = "Standford 2015";
    

    【讨论】:

      【解决方案7】:

      使用 plist CFBundleDisplayName 设置图标下方的空格。

      更多信息: What's the difference between "bundle display name" and "bundle name" in cocoa application's info plist

      【讨论】:

      • 这和我说的有什么不同?
      • @matt 请注意指向更多信息的链接,该链接解释了其他极端情况。
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-09-20
      • 1970-01-01
      相关资源
      最近更新 更多