我在抛出异常错误的类别中调用一个函数:
-[NSPathStore2 countByEnumeratingWithState:objects:count:]: unrecognized selector sent to instance 0x1f5572b0
该块内引发错误。
NSArray *shindys = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0];
NSError *error = nil;
__weak UIManagedDocument *shindyDatabase = self.shindyDatabase;
dispatch_queue_t downloadQueue = dispatch_queue_create("Shindy Fethcer", nil);
dispatch_async(downloadQueue, ^{
for (NSDictionary *shindyInfo in shindys) {
[Shindy shindyWithShindyDBInfo:shindyInfo inManagedObjectContext:shindyDatabase.managedObjectContext];
[shindyInfo setValue:self.detailView.text forKey:@"details"];
NSLog(@"This is getting performed.");
}
});
预先分配NSDictionary
没有帮助。