lets imagine that I need to know which apps was run in 1 week period.
Query for terminal looks like:
mdfind '(InRange(kMDItemFSContentChangeDate,$time.today(-7d),
$time.today(+1d)) && ((kMDItemContentTypeTree=com.apple.application) &&
InRange(kMDItemLastUsedDate,$time.today(-7d),$time.today(+1d))))'
so my query is:
'(InRange(kMDItemFSContentChangeDate,$time.today(-7d),
$time.today(+1d)) && ((kMDItemContentTypeTree=com.apple.application) &&
InRange(kMDItemLastUsedDate,$time.today(-7d),$time.today(+1d))))'
How can I run THIS query syntax from swift code and to receive URLs/paths as result of query?
I have seached for NSMetadataQuery but looks like I cannot use this search query as predicate in it...
Did I miss sth?
Or for query with such syntax I need to use some another instrument, but not NSMetadataQuery?