3

currently, the hierarchy is flattened out, and all the headers files are copied into a single Headers directory, no matter what subfolder they were in, in my Classes folder.

This is a problem when referencing the headers, if the headers have "include" statements that reference other headers in subfolders.

in particular, this screws up BridgeSupport compilation.

johnrubythecat
  • 1,003
  • 1
  • 13
  • 31
  • I think you should give an example of a header and a second header which is includes, and also any errors that are produced. – drekka May 26 '11 at 06:39

3 Answers3

3

My understanding is the Copy Headers behavior always flattens the file structure. You can either add a custom file copy or a custom script at the end of the process that copies (cp -r) the headers from their original location to your desired destination. These are viable workarounds for now. Meanwhile, definitely post your request to bugreport.apple.com.

Scott Lahteine
  • 1,040
  • 11
  • 20
1

Add source folder as reference to folder (radio button in the "Add files..." dialog). Then drag'n'drop those folders to "Build Phases->Copy Files". After this headers will be located in folders on next build.

user2041064
  • 131
  • 7
0

From http://lists.apple.com/archives/xcode-users/2007/Oct/msg00162.html

"Try adding the folder containing the header to Xcode as a folder reference, and then add that to the Copy Headers build phase (you'll probably have to drag-drop it into the phase rather than checking the checkbox in the detail view). Folder references are the mechanism Xcode provides for preserving a directory hierarchy during a copy."

Paul Beusterien
  • 27,542
  • 6
  • 83
  • 139