0
我現在從iCloud中在我的iOS應用程序搜索文檔用以下代碼的iCloud NSPredicate錯誤的iOS
NSPredicate* predicate = [NSPredicate predicateWithFormat:@"%K CONTAINS[c] %@", NSMetadataItemFSNameKey,searchText];
[self.notes filterUsingPredicate:predicate];
[self.tblMainTableView reloadData];
當我運行和搜索它,它顯示與以下錯誤消息
*** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<Note 0x1cd4ed10> valueForUndefinedKey:]: this class is not key value coding-compliant for the key kMDItemFSName.'
錯誤
我如何搜索它?
對不起,但'NSMetadataQuery'返回包含屬性'NSMetadataItemFSNameKey'的NSMetadataItems'。這可能是一些iOS錯誤。多一個。 – SpaceDog