CoreSpotlight 框架与 Spotlight 索引扩展?

CoreSpotlight framework vs Spotlight Index Extension?

CoreSpotlight 示例:

https://applidium.com/en/news/ios9_search_api/

Spotlight Index Extension 示例:

http://apprize.info/apple/ios_9/53.html

你能解释一下这两种Spotlight用法的区别吗?

CoreSpotlight API 允许您在应用程序处于前台时通过 CSSearchableIndexCSSearchableItem 对象重新索引应用程序的内容。这些(重新)索引的对象将在 Spotlight 搜索(来自 iOS 仪表板的设备上搜索)中可用。

Spotlight Index Extension 允许您执行相同的操作,但您的应用程序在 background/killed 中。委托的实现功能仅在特定条件下调用。如果您的(重新)索引对象出现问题,这很重要。

更多详情

Spotlight extension points:

  • Use the app indexing extension point to index data in your app.
  • Use the Index Maintenance extension point to support the reindexing of app data without launching the app.

最佳