O'Reilly logo

Mastering iOS 11 Programming - Second Edition by Donny Wals

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding CSSearchableItem instances to the search index

In the familymovies application, we want to add family members and movies to the search index as soon as they are added by the user. We already have a factory method in place that creates the CSSearchableItemAttributeSet instance that describes the item we want to index. However, we can't directly add these to the index. To add information to the search index manually, as we want to, we need instances of CSSearchableItem. To create such an instance, we need the following two further pieces of information: a unique identifier and a domain identifier.

The unique identifier is used to uniquely identify an indexed item. It's important that you set this value to something that is actually unique ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required