Specify Spotlight keywords iOS 9

你。 提交于 2019-12-03 23:15:37

问题


In iOS 9, is there a way to give spotlight a list of keywords by which users can search for a specific app?

Example scenario: App Title (as displayed on spring board): "Photos," but User searches for "Pictures" or "Photographs."

If not, are the keywords as listed in the App Store used index the app on the device?


回答1:


CoreSpotlight Framework does it.

  • https://developer.apple.com/library/prerelease/ios/documentation/CoreSpotlight/Reference/CoreSpotlight_Framework/

  • https://www.shinobicontrols.com/blog/ios9-day-by-day-day1-search-apis




回答2:


You can achieve this by using either NSUserActivity or Core Spotlight framework.

Keywords property of NSUserActivity class can be used. OR In Core Spotlight framework, keywords property of CSSearchableItemAttributeSet can be used.



来源:https://stackoverflow.com/questions/32799748/specify-spotlight-keywords-ios-9

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