在Spotlight中重复搜索结果 [英] Duplicate search results in spotlight

查看:75
本文介绍了在Spotlight中重复搜索结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个需要一起使用NSUSerActivity和Corespotlight的要求.即使设置了relatedUniqueIdentifier,我仍会在聚光灯下看到重复的搜索结果 = uniqueidentifer.

I have a requirement where I need to use NSUSerActivity and Corespotlight together. I see duplicate search results in spotlight even after I set relatedUniqueIdentifier =uniqueidentifer.

这是我在项目中实现的步骤.

Here is the steps I implemented in my project.

1)在appdeleagte didFinishLaunchingWithOptions方法中创建所有CSSearchableItems.

1) Create all CSSearchableItems in appdeleagte didFinishLaunchingWithOptions method.

2)在特定的视图控制器中创建NSUSerActivity,其中relatedUniqueIdentifier = uniqueidentifer(CSSearchableItem)

2) Create NSUSerActivity in specific viewcontroller where relatedUniqueIdentifier = uniqueidentifer(CSSearchableItem)

感谢您的帮助.

推荐答案

在NSUSerActivity中添加了requiredUserInfoKeys之后,该问题已得到解决.

The issue got resolved after adding requiredUserInfoKeys in NSUSerActivity.

这篇关于在Spotlight中重复搜索结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆