The following code is outputting The operation couldn’t be completed. (Cocoa error 256.)
and the filenames NSArray is null/empty. There should be files in this folder, any ideas whats broken?
NSError *error;
NSFileManager *fm = [NSFileManager defaultManager];
filenames = [fm contentsOfDirectoryAtPath:[[NSBundle mainBundle] pathForResource:@"files" ofType:nil] error:&error];
NSLog(@"%@", [error localizedDescription]);
[[NSBundle mainBundle] pathForResource:@"files" ofType:nil] is returning null for some reason
Nil extensions aren't folders, iOS treats them like files. You have to use -resourcePath
then append the name of your folder instead.