4 Replies Latest reply: Aug 16, 2008 1:46 PM by iPhil_good
Jonny777 Level 1 Level 1 (0 points)
In my app I have about 100 small images, which I would like to place in a subfolder inside the app bundle, so that the bundle's root directory remains clutter-free with the few essential files.

I have tried everything but I cannot create subfolders in an iPhone app bundle. I would appreciate any detailed pointers on how to accomplish this.


MacBook, Mac OS X (10.5.4)
  • Carsten Whimster Level 1 Level 1 (20 points)
    You shouldn't let how the app bundle is laid out on the iPhone bother you. Apple decides that. Locally you can organize your project with folders. Just remove the images from the project, move them on disk, and then re-add them, making sure to tidy up loose path references afterwards.
  • iPhil_good Level 1 Level 1 (125 points)
    Drag the folder containing your images to your "Groups & Files" outline and in the dialog select "Create Folder References for any added folders" instead of the option creating groups.

    Anyway this seems to be a bad idea to do so. First because you don't have to bother how clean is the bundle But also because your folder seems to be locked and no modification seems to be possible.

    And last but not least, I'm not sure the files will be easily accessed, especially images with the method
    [NSImage imageNamed:@"myimage.png"]

    Perform some checks before you decide !

  • Jonny777 Level 1 Level 1 (0 points)
    Thanks iPhil, but it doesn't work. In the app bundle the images all appear in the root folder.
  • iPhil_good Level 1 Level 1 (125 points)
    Sorry I thought it would work

    Now I remember having unsuccessfully tried that, and I ended adding the folder manually by opening the app package after compilation !!

    This was not good at all ... So I gave up and met my needs another way.

    But once again if it's only cosmetic, then forget about it, all MacOS/iPhone bundles are this dirty

    Sorry again ;-/