Following is the code that I am trying to implement to make app activities and states searchable but not able to show on iOS search
NSUserActivity *userActivity = [[NSUserActivity alloc]initWithActivityType:@"com.mycompany.activity-type"];
userActivity.title = @"Hello world from in app search";
userActivity.keywords = [NSSet setWithArray:@[@"Hello",@"Welcome", @"search"]];
userActivity.userInfo = @{@"id":@"com.example.state"};
userActivity.eligibleForSearch = YES;
[userActivity becomeCurrent];
Link to make my question more clear.
What I have found is you have to assign the NSUserActivity instance you have created to your currently visible UIViewControllers's userActivity property before calling -becomeCurrent. It has fixed it for me and the items immediately appeared both for handoff on other devices and in spotlight search on the same device.