草庐IT

CoreSpotlight

全部标签

ios - CoreSpotlight 索引由于某种原因无法正常工作

我想让我的应用程序为Spotlight索引做好准备,所以我得到了下面的代码来向CoreSpotlight添加一个项目:CSSearchableItemAttributeSet*attributeSet=[[CSSearchableItemAttributeSetalloc]initWithItemContentType:(NSString*)kUTTypeImage];attributeSet.title=appName;attributeSet.contentDescription=appDescription;attributeSet.keywords=appKeywordsArr

IOS9 : CoreSpotlight and Siri

在我的IOS9应用程序中,我可以使用CoreSpotlight库将数据添加到Spotlight的索引(即,当我使用Spotlight搜索框进行搜索时,我添加到索引的内容会显示出来)。但是,Siri似乎并没有从那里提取信息。这是我的代码:letattributeSet=CSSearchableItemAttributeSet(itemContentType:kUTTypeTextasString)attributeSet.title="AWSTraffic"attributeSet.contentDescription="AWSServerTrafficinMyCompany"attri

ios - CoreSpotlight 索引

您好,我正在尝试在我的应用中实现CoreSpotlight。索引时我需要每次都运行这个还是在第一次安装应用程序时运行一次就足够了?如果应用被删除,我需要重新索引吗?这是我使用的代码:-(void)spotLightIndexing{NSString*path=[[NSBundlemainBundle]pathForResource:@"aDetailed"ofType:@"plist"];NSDictionary*plistDict=[[NSDictionaryalloc]initWithContentsOfFile:path];NSArray*plistArray=[plistDic

ios - CoreSpotlight 缩略图图像未显示在 Spotlight 搜索中

我正尝试在CoreSpotlight的帮助下让我的应用内内容可搜索。一切正常,标题和描述都出现了,但没有缩略图。这是我正在尝试的:CSSearchableItemAttributeSet*attributeSet=[[CSSearchableItemAttributeSetalloc]initWithItemContentType:(NSString*)kUTTypeImage];attributeSet.title=@"MyFirstSpotlightSearch";attributeSet.contentDescription=@"ThisismyfirstspotlightSea

ios - CoreSpotlight 索引不起作用

我正在使用CoreSpotLightapi来索引一些内容。出于某种原因,我在搜索时找不到数据聚光灯。letatset:CSSearchableItemAttributeSet=CSSearchableItemAttributeSet()atset.title="Simpletitle"atset.contentDescription="Simpletwittersearch"letitem=CSSearchableItem(uniqueIdentifier:"id1",domainIdentifier:"com.shrikar.twitter.search",attributeSet:

来自 URL 的 iOS CoreSpotlight 缩略图

我正在尝试构建一个测试应用程序,该应用程序使用CoreSpotlight使内容可在iOSSpotlight中搜索。目前,我将其设置为每当用户点击刷新按钮时,它都会发出服务器请求,然后deleteAllSearchableItems然后indexSearchableItems(可能不是最好的方法,但现在最简单,因为我我仍处于解决这个问题的初期阶段)。下面是我的代码。varsearchableItems:[CSSearchableItem]=[]foriin0..VoidinCSSearchableIndex.default().indexSearchableItems(searchabl
12