问题
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