Xcode will not seem to recognize a particular directory of files in the Resources group. This is how I’m retrieving the folder:
NSString *tileDirectory = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"Tiles"];
And this is the error that I get:
2011-03-06 17:52:47.660 [*removed*][36648:207] Could not locate any tiles at /Users/james/Library/Application Support/iPhone Simulator/4.2/Applications/909785DD-B3E8-41CB-A3D9-C19D1826C448/[*removed*].app/Tiles
I checked, and sure enough that directory does not exist. But it does exist in the project directory.
I have done the following:
- Deleted the app off of the simulator
- Deleted the “Tiles” folder from the actual app directory and from within the Resources group in Xcode
- Cleaned all targets
- Dragged the “Tiles” folder from another location directly into the “Resources” group in Xcode and told it to copy into the directory
File groups in XCode don’t necessarily translate to folders inside your compiled application bundle.
Try using this alternate method for accessing your application resources:
Note that you don’t have to specify where your
MyFile.txtfile actually is — as long as it exists in your project as a resource, it will be found.