iOS

Core SpotLight in iOS

Core-Spotlight

Objective-C

  1. Create a new iOS project and add CoreSpotlight and MobileCoreServices framework to your project.

enter image description here

  1. Create the actual CSSearchableItem and associating the uniqueIdentifier, domainIdentifier and the attributeSet. Finally index the CSSearchableItem using [[CSSearchableIndex defaultSearchableIndex]…] as show below.

enter image description here

  1. OK!Test the index!

enter image description here


This modified text is an extract of the original Stack Overflow Documentation created by the contributors and released under CC BY-SA 3.0 This website is not affiliated with Stack Overflow