To achieve this your application has to be launched atleast once, and in didFinishLaunchingWithOptions:
of your AppDelegate
you can index your Core Spotlight
searchable item like below:
CSSearchableItemAttributeSet* attributeSet = [[CSSearchableItemAttributeSet alloc] initWithItemContentType:@"myApp.image"];
attributeSet.title = @"My Old App";
attributeSet.contentDescription = @"This application help you in acheiving so & so";
CSSearchableItem *item = [[CSSearchableItem alloc] initWithUniqueIdentifier:@"myApp" domainIdentifier:@"com.myapp" attributeSet:attributeSet];
// Index the item.
[[CSSearchableIndex defaultSearchableIndex] indexSearchableItems:@[item] completionHandler: ^(NSError * __nullable error) {
NSLog(@"Search item indexed");
}];
You can even add thumbnail image to be shown when the app with old name is searched; You need to add following code before creating the searchableItem
UIImage *image = [UIImage imageNamed:@"MercC"];
NSData *thumbNailData = UIImagePNGRepresentation(image);
attributeSet.thumbnailData = thumbNailData;