【问题标题】:iOS app: keep old application name as keyword?iOS应用程序:将旧应用程序名称保留为关键字?
【发布时间】:2016-08-23 12:31:18
【问题描述】:

我需要重命名我的应用程序的名称。

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

plist 文件或其他地方是否有任何指定值,使其捆绑显示名称为新名称,而旧名称仍可搜索?

【问题讨论】:

  • 您可以在 iTunes 连接中添加任意数量的关键字。
  • 通过添加新旧名称作为关键字,用户也可以通过旧名称搜索应用程序。没有其他快捷方式或plist入口方法。
  • iPhone 的搜索(“聚焦搜索”)无法访问关键字。
  • 在 ios10 聚光灯搜索之前不会显示您的旧应用名称。这是设计使然。您可以使用 stackoverflow.com/questions/32799748/… 用于 ios9。
  • 我投票结束这个问题,因为它不是关于编程的。

标签: ios app-store-connect itunes-store


【解决方案1】:

要实现这一点,您的应用程序必须至少启动一次,并且在您的 AppDelegatedidFinishLaunchingWithOptions: 中,您可以索引您的 Core Spotlight 可搜索项,如下所示:

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;

【讨论】:

    猜你喜欢
    • 2015-07-24
    • 2017-06-18
    • 1970-01-01
    • 2017-01-15
    • 2015-07-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-02-12
    相关资源
    最近更新 更多