How can I choose a different iOS app name for Spotlight?

拥有回忆 提交于 2019-12-08 05:22:57

问题


The name of my app is French Translator +

This app name is too long to be displayed under the app icon so I would like to shorten it to Translator +, however I would still like users to find it when searching Spotlight for "french".

How can I register an app name for Spotlight searches that is different than app name appearing under the app icon.


回答1:


You can always add your own keywords to the search index. Something like this:

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])



回答2:


You can customize the full AppStore name to include more than than the name that it shown in Springboard and that will be used in indexing the app as well even in local spotlight searches.

You can also use CoreSpotlight to add additional content if you want to go that far.



来源:https://stackoverflow.com/questions/48343980/how-can-i-choose-a-different-ios-app-name-for-spotlight

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!