I’ve put a actual folder inside my app project and i would like to get the content of the folder out. I’ve tried the code below, but it always sends me to my home directory on my computer. How do you get to root level in your app?
NSArray *test = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:[[NSBundle bundleWithPath:@"/test"] bundlePath] error:nil];
NSLog(@"%@", test);
The bundle of your app is given by
[NSBundle mainBundle]. Following your code example the path to your directory is: