Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

kamo

macrumors member
Original poster
Mar 21, 2008
34
0
Hello,

I have a a bunch of resources organized in folders. Eg:

Code:
[Cars]
  [Red]
    front.jpg
    side.jpg
  [Green]
    front.jpg
    side.jpg
[] are folders. I'd like to have xcode copy this folder structure into he Resources of the project.

When I add the [Cars] folder as an existing file to the Resources, xcode copies the jpegs to the project root. When it builds the target, it copies the jpegs to the build root instead of the Resources folder. Also, the folder structure is not recreated. So obviously I'm doing something wrong....

How can I add this folder structure to my resources?

Thanks,
kamo
 

Sayer

macrumors 6502a
Jan 4, 2002
981
0
Austin, TX
Add a new "Copy Files" Build Phase to the target you are building. Add a new build phase using the Build menu in Xcode.

Then drag and drop the Resource folder or files in the project file list on the left side of the window to the "Copy Files" build phase.

To set which folder the files are copied to you select the "Copy Files" build phase in the target list and type Command-I (Get Info). In the "Destination" popup menu you can select which sub-folder the files will be copied to.

Sample screenshot: http://att.macrumors.com/attachment.php?attachmentid=107711&d=1205431384
 

ramzez

macrumors member
Feb 25, 2008
31
0
i have tried both ways but nothing is copied to my iphone simulator, any help would be nice!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.