Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Mar 22, 2008, 11:09 AM   #1
kamo
macrumors member
 
Join Date: Mar 2008
adding resources in xcode with folders

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
kamo is offline   0 Reply With Quote
Old Mar 22, 2008, 11:16 AM   #2
Cromulent
macrumors 603
 
Cromulent's Avatar
 
Join Date: Oct 2006
Location: The Land of Hope and Glory
Just use Add folder or group or whatever it is called and do it yourself.
__________________
Neural Advance - Mac OS X, UNIX and Windows Development
Last.fm Profile | Extreme Metal Reviews
MP 4x 2.66Ghz Xeons / 6GB RAM / 640GB + 500GB + 750GB + 1TB HDDs / ATI Radeon 4870 / iPad 3
Cromulent is offline   0 Reply With Quote
Old Mar 22, 2008, 03:54 PM   #3
Sayer
macrumors 6502a
 
Sayer's Avatar
 
Join Date: Jan 2002
Location: 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....1&d=1205431384
__________________
Obama is a true statesman whose experience as a state senator, half-term US Senator & guest lecturer in a Constitutional Law class has fully prepared him to take control of our nuclear arsenal.-Me
Sayer is offline   0 Reply With Quote
Old Mar 22, 2008, 05:54 PM   #4
kamo
Thread Starter
macrumors member
 
Join Date: Mar 2008
thanks, that worked perfectly!
kamo is offline   0 Reply With Quote
Old Aug 27, 2008, 06:42 PM   #5
ramzez
macrumors member
 
Join Date: Feb 2008
i have tried both ways but nothing is copied to my iphone simulator, any help would be nice!
ramzez is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
XCODE 4.5 , calendar app resources iNeedAnsurs iPhone 0 Jan 26, 2013 04:37 PM
Adding an Image in Xcode 4.5 Blakeasd Mac Programming 2 Dec 15, 2012 10:34 AM
Adding an Image in Xcode 4.5 Blakeasd OS X 10.8 Mountain Lion 1 Dec 14, 2012 09:32 PM
Interested in learning Obj-C/Xcode what are some good resources? hugodrax Mac Programming 3 Nov 10, 2012 10:07 PM
Help with adding and subtraction in Xcode kingv84 Mac Programming 5 Jun 18, 2012 05:36 PM

Forum Jump

All times are GMT -5. The time now is 04:20 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC