In my viewController, I'm creating an NSUserActivity, attaching an CSSearchableItemAttributesSet, assigning the activity to the viewController's userActivity property, and then calling becomeCurrent on the activity as below:
NSUserActivity *userActivity = [[NSUserActivity alloc] initWithActivityType:activity.uniqueIdentifier];
CSSearchableItemAttributeSet *attribs = [self attributesForActivity:activity]; //sets title, contentDescription
userActivity.contentAttributeSet = attribs;
userActivity.eligibleForSearch = YES;
userActivity.eligibleForHandoff = YES;
userActivity.eligibleForPublicIndexing = YES;
self.userActivity = userActivity;
[self.userActivity becomeCurrent];
But nothing is showing up. I've tried running this on the simulator and on an iPhone 5 device, but nothing is happening. Can't see any log files to indicate anything is amiss.
If I use Core Spotlight and add the same item to the index, it shows up immediately on both device and simulator. Is the NSUserActivity integration not working yet?