2016-08-23 72 views
1

我需要重命名我的应用程序的名称。iOS应用程序:保留旧的应用程序名称作为关键字?

是否可以在某处存储其旧名称的某些元数据? 用户可能会尝试在iPhone的搜索选项中搜索其旧名称。

在plist文件或其他地方是否有任何指定值,以便它的包显示名称是新名称,而旧名称仍可搜索?

+0

,只要你想在iTunes Connect中可以添加asmany关键字前添加以下代码。 –

+1

通过添加旧名称和新名称作为关键字,用户将能够以旧名称搜索应用程序。没有其他快捷方式或plist输入方法。 –

+0

iPhone的搜索无法访问关键字(“聚光灯搜索”)。 – Nili

回答

1

要做到这一点你的应用程序必须要ATLEAST一经推出,并在你的AppDelegate你可以索引你的Core Spotlight搜索项像下面didFinishLaunchingWithOptions::要显示

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"); 
}]; 

您甚至可以添加缩略图时,搜索旧名称的应用程序;您需要创建searchableItem

UIImage *image = [UIImage imageNamed:@"MercC"]; 
NSData *thumbNailData = UIImagePNGRepresentation(image); 
attributeSet.thumbnailData = thumbNailData; 
相关问题