Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NSUserActivity missing contentAttributeSet property

I'm implementing the iOS9 Search index using NSUserActivities. According to the documentation NSUserActivity there should be a property called contentAttributeSet that is used to add more content to the search item. However looking at the NSUserActivity class in Xcode 7 shows no property with this name. I'm using Xcode 7 beta 6.

like image 317
Olle Lind Avatar asked Sep 08 '15 09:09

Olle Lind


1 Answers

Got it now.

The contentAttributeSet is of type CSSearchableItemAttributeSet, which is a class in the Core Spotlight framework. So I had to add Core Spotlight to my project and import it in the file I was using NSUserActivity in.

Sneaky sneaky, Apple!

like image 144
Olle Lind Avatar answered Nov 14 '22 22:11

Olle Lind