XCode tip: Generating folders in the Resource folder

Member
Posts: 257
Joined: 2004.06
Post: #1
I know a while back there was some discussion about how to get XCode to generate sub-folders when you have a gazillion things in your Resources group that are in nice little groups but then get mass copied into the Resources folder as one big mess. Anyway, I was messing around with organizing my project today and it turns out that if you drop a folder into your project window and specify "Create Folder References for any added folders", it will indeed create the folder references and when you build the app, it will create the sub-folders and put your files in there. Much better than having 50+ files in there, I think.

The brains and fingers behind Malarkey Software (plus caretaker of the world's two brattiest felines).
Quote this message in a reply
Luminary
Posts: 5,131
Joined: 2002.04
Post: #2
The problem is that it won't recognize individual files being updated within those folder references, so you'll have to build clean each time you change a resource. Go Xcode!

The ultimate solution is to write a shell script build phase that copies the resources however you like. It can also be handy to have that shell script build phase make symbolic links when it's making a debug build, so that you can edit resources and have the change take effect without a rebuild.
Quote this message in a reply
Member
Posts: 257
Joined: 2004.06
Post: #3
OneSadCookie Wrote:The problem is that it won't recognize individual files being updated within those folder references, so you'll have to build clean each time you change a resource. Go Xcode!

Ah, that's right. I had forgotten about that. Ah well. I guess I'll be writing that shell script then.

Edit: Wait, before I go off to do this, anyone have any example shell scripts they use for this? It's been a really, really long time since I've done shell scripting.

The brains and fingers behind Malarkey Software (plus caretaker of the world's two brattiest felines).
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Xcode4: Resource not in Documents folder? SparkyNZ 3 5,647 Apr 9, 2011 03:29 PM
Last Post: SparkyNZ
  Windows utility that can read Mac resource files? MarkS 2 3,235 Sep 24, 2009 05:52 PM
Last Post: MarkS
  moving all folder project = error imaumac 2 2,665 Oct 13, 2008 08:46 AM
Last Post: imaumac
  Library/Preferences folder someone 5 5,283 May 17, 2007 10:31 AM
Last Post: millercdusa
  how do I a set a ICNS to a file or folder Najdorf 8 4,663 Dec 21, 2005 12:25 PM
Last Post: Najdorf