In Xcode 4, I have a large folder tree with many media files (mostly images) that are being used in the project (iPhone App). In finder they are all in directories and everything is good, but when xcode builds the project, all of my images are suddenly in the root of the app. This really makes no difference to how it runs, but I have A LOT of media and its beginning to bug me. ex:
Xcode project and in finder:
../SomeApp/Images/Source1/image1.png
And in the build project:
SomeApp.app/image1.png
I want it to be
SomeApp.app/Images/Source1/image1.png
Also, I noticed that I access the files by [[NSBundle mainBundle] pathForResource....] and that works fine when they are all in the root folder, but if I manually make a folder for the images, it does not find them.
you need to add a folder reference i believe, rather than just dropping them in there. Xcode does not really want you to do this if it can be avoided. But basically you can link a folder into your project and the bundle will respect that. Goto add files, then select create folder rederence rather than group.
If done properly you will see a blue folder not a yellow one.
Then just confirm the folder is in your bundle under copy bundle resources. But every thing will need to use path for resource, you wont be able to use -[UIImage imageNamed] with files in folders this.