nsmetadataquery

NSMetaDataQuery never calls back with NSMetadataQueryDidFinishGatheringNotification

南笙酒味 提交于 2019-12-03 18:05:57
问题 For an iCloud plugin I'm writing, I subscribe my iCloud manager class to these iCloud NSMetaDataQuery observers: // Add a predicate for finding the documents NSString* filePattern = [NSString stringWithFormat:@"*.%@", @"*"]; self.metadataQuery = [[NSMetadataQuery alloc] init]; // Before starting to query, it is required to set the search scope. arrayWithObject:NSMetadataQueryUbiquitousDocumentsScope]]; // It is also required to set a search predicate. [self.metadataQuery setPredicate:

NSMetadataQuery ignoring custom file package type

为君一笑 提交于 2019-12-01 03:29:19
问题 I'm using UIManagedDocument s to manage my files in iCloud. After setting up the NSMetadataQuery like so: iCloudQuery = [[NSMetadataQuery alloc] init]; [iCloudQuery setSearchScopes: [NSArray arrayWithObject:NSMetadataQueryUbiquitousDocumentsScope]]; [iCloudQuery setPredicate: [NSPredicate predicateWithFormat:@"%K like %@", NSMetadataItemFSNameKey, @"DocumentMetadata.plist"]]; I'm encountering a curious problem - when my documents are named without a file extension (for example @"NewDocument2"

NSMetaDataQuery never calls back with NSMetadataQueryDidFinishGatheringNotification

谁说胖子不能爱 提交于 2019-11-29 10:41:28
For an iCloud plugin I'm writing, I subscribe my iCloud manager class to these iCloud NSMetaDataQuery observers: // Add a predicate for finding the documents NSString* filePattern = [NSString stringWithFormat:@"*.%@", @"*"]; self.metadataQuery = [[NSMetadataQuery alloc] init]; // Before starting to query, it is required to set the search scope. arrayWithObject:NSMetadataQueryUbiquitousDocumentsScope]]; // It is also required to set a search predicate. [self.metadataQuery setPredicate:[NSPredicate predicateWithFormat:@"%K LIKE %@", NSMetadataItemFSNameKey, filePattern]]; // Listen for the