Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CoreSpotlight framework vs Spotlight Index Extension?

CoreSpotlight example:

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

Spotlight Index Extension example:

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

Could you explain the difference between these 2 ways of Spotlight usage?

like image 366
Vyachaslav Gerchicov Avatar asked Aug 01 '16 13:08

Vyachaslav Gerchicov


Video Answer


1 Answers

The CoreSpotlight API lets you reindex your app's content through CSSearchableIndex and CSSearchableItem objects while your app is in foreground. Those (re)indexed objects will then be available on the Spotlight search (a on-device search from the iOS dashboard).

The Spotlight Index Extension lets you do the same but while your app is in the background/killed. The implemented functions of the delegate are only called under certain conditions. This is important in case a problem occurs with your (re)indexed objects.

More detail here:

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.

Best

like image 97
Kevin Delord Avatar answered Oct 17 '22 11:10

Kevin Delord