Sample Code- (void)spotlightTest { self.dummyList = [[NSMutableArray alloc] init]; for (NSInteger i = 0; i < 10; i++) { [self.dummyList addObject:[NSString stringWithFormat:@iMac%ld MacBook%ld iPhone%ld, i, i, i]]; } NSMutableArray *searchableItems = [[NSMutableArray alloc] init]; NSMutableArray *identifierlist = [[NSMutableArray alloc] init]; for (NSString *name in self.dummyList) { if (name != nil) { CSSearchableItemAttributeSet *attributeSet = [[CSSearchableItemAttributeSet alloc] initWithItemContentType:(NSString*)kUTTypeText]; attributeSet.title = @Test Spotlight; attributeSet.contentDescription = name; NSMutableArray *keywords = [[NSMutableArray alloc] initWithArray:[name componentsSeparatedByString:@ ]]; if ([keywords count] > 1) { [keywords addObject:name]; } attributeSet.keywords = keywords; // Identifier isn't English (Ex.include Korean, ect) NSString *identifier = [NSString stringWithFormat:@com.(OOO).test.%@, name]; // OOO Korean, Chinese, ect CSSearchableItem *item = [[CSSearchableItem allo
2
0
1.2k