【问题标题】:How can I choose a different iOS app name for Spotlight?如何为 Spotlight 选择不同的 iOS 应用程序名称?
【发布时间】:2018-06-28 20:45:06
【问题描述】:

我的应用名称是法语翻译+

此应用名称太长,无法显示在应用图标下方,因此我想将其缩短为 Translator +,但我仍希望用户在 Spotlight 搜索“法语”时找到它。

如何为 Spotlight 搜索注册与应用图标下方显示的应用名称不同的应用名称。

【问题讨论】:

    标签: ios spotlight


    【解决方案1】:

    您始终可以将自己的关键字添加到搜索索引中。像这样的:

    let attributeSet = CSSearchableItemAttributeSet(itemContentType: kUTTypeData as String)
    attributeSet.title = "Your title"
    attributeSet.contentDescription = "Your description"
    attributeSet.keywords = ["your", "keywords"]
    let item = CSSearchableItem(uniqueIdentifier: "0", domainIdentifier: "your domain", attributeSet: attributeSet)
    CSSearchableIndex.default().indexSearchableItems([item])
    

    【讨论】:

    • 虽然这可能有效,但请注意,它实际上会使 Spotlight 索引成为不存在的项目(具有 "0" 唯一标识符)。所以它不会为应用程序本身设置备用名称。
    【解决方案2】:

    您可以自定义完整的 AppStore 名称,使其不仅包含在 Springboard 中显示的名称,而且将用于索引应用程序以及甚至在本地聚光灯搜索中。

    如果您想走得更远,还可以使用 CoreSpotlight 添加其他内容。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-12-09
      • 1970-01-01
      • 2017-01-15
      • 2010-09-19
      • 2018-01-20
      • 1970-01-01
      • 2011-09-26
      相关资源
      最近更新 更多