Spotlight NSMetaDataQuery with invisible items do not auto update

时光怂恿深爱的人放手 提交于 2020-01-06 08:14:46

问题


The original search runs fine, but any changes to invisible items go unnoticed by the query.

The query can be ran again and it will find the updates.

The query is non-nil and spotlight notifications have not been unsubscribed.

Is this a bug or expected behavior?

I have tested this several times in a few different projects and it seems to hold true.


回答1:


One technique for saving a document bundle is to take advantage of the fact that Spotlight does not import metadata from invisible files or directories.

Emphasis added; quote from a page of the Spotlight Overview.



来源:https://stackoverflow.com/questions/1487641/spotlight-nsmetadataquery-with-invisible-items-do-not-auto-update

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!