December 2017
Intermediate to advanced
648 pages
13h 46m
English
iOS brings with it some really exciting functionality, such as indexing content inside your app as searchable content on an iOS device. Even better, you can contribute to iOS’s public search index so that your searchable content appears on devices that don’t even have your app installed. That’s pretty cool, don’t you agree? In this chapter, we’ll have a look at all these great features.
You are already indexing your app content in Spotlight (more recipes on that in this chapter), but you also want to allow the user to continue the search from Spotlight directly in your app (see Figure 13-1).
Follow these steps:
CoreSpotlightContinuation key to your Info.plist file with a Boolean value of YES. This will allow your app to take part in Spotlight search continuation.application(_:willContinueUserActivityWithType:) method of your app delegate.CSQueryContinuationActionType. If yes, return true; otherwise, return false (or, if you have other activity types to process, look at those as well before returning false).application(_:continue:restorationHandler:) ...Read now
Unlock full access