objective c - NSMetadataQuery returns results outside of searchScopes -


i'm working joint mac/ios app syncs documents , data via icloud 1 another. in order detect when data changes, use nsmetadataquery observe relevant icloud folder.

the apps use purely local data storage monitor nsmetadataquery object in case user deletes or adds documents finder.

each separate nsmetadataquery objects given distinct searchscopes not observe each others respective folders accident.

the problem local query doesn't respect searchscope , randomly return values outside of it.

here example 1 of times caught misbehaving.

(lldb) po docquery.searchscopes $1 = 0x0000000101553ae0 <__nsarrayi 0x101553ae0>( file://localhost/users/aschenk/library/containers/com.chimpstudios.cloudclipboard/data/documents/largeclippings ) 

and here url of 'found' file

erroneous query reporting >> file://localhost/users/aschenk/library/mobile%20documents/8yjaw5la57~com~chimpstudios~cloudclipboard/documents/d7d31630-81b7-47aa-bee7-71a5b8d96b23.ccc/ 

for now, i've resorted double checking query results live within searchscope. feels bug api, wanted double check here before file report apple on chance stupid overlooked.


Comments

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -