Index your app so users can search the content from Spotlight and Safari.
- iOS 9.0+
- macOS 10.13+
You can help users access activities and items within your app by making your content searchable. The Core Spotlight framework provides APIs to label and manage persistent user data like photos, contacts, and purchased items in the on-device index, and allows you to create links into your app.
The Core Spotlight APIs do not make items publicly searchable. Instead, Core Spotlight enables you to make items searchable in the user's private, on-device index, the contents of which is never shared with Apple or synced between devices.
iOS provides additional strategies for making your app's content searchable:
You can use the search-related properties of NSUserActivity to add items to the on-device index, and have the option to identify the items as eligible for public indexing. Learn more about NSUserActivity in Index Activities and Navigation Points.
If your app’s content is also available on your website, use web markup to index your content in Apple’s server-side index, which makes the data available to all iOS users in Spotlight and Safari search results. (See Mark Up Web Content in the App Search Programming Guide.)
Core Spotlight enables you to index content at any point, such as when the app loads, and the Core Spotlight APIs do not require users to visit the content in order to index it. Core Spotlight works best when you have no more than a few thousand items.