views:

195

answers:

0

Using NSBundle in "Iphone" and "Xcode":

I have three folders on Mac, with the same file name: AnyFile.txt the structure is the following:

Folder1
|- AnyFile.txt

Folder2
|- AnyFile.txt

|-- Folder3
    |- AnyFile.txt

I put them into Xcode as REFERENCE in three different GROUPS (with the same structure as the above)

I want to read the files separately using the inDirectory property, I do the following:

NSBundle *thisBundle = [NSBundle bundleForClass:[self class]];

NSString *fullPath = [someBundle pathForResource:@"AnyFile" ofType:@"txt" inDirectory:@"Folder1"];

But the result of the fullPath is nil.

Is it possible to do read the folder from a separately directory?