• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Header files are included in built package resources
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Header files are included in built package resources


  • Subject: Re: Header files are included in built package resources
  • From: Chris Espinosa <email@hidden>
  • Date: Sun, 5 Mar 2006 16:10:44 -0800


On Mar 5, 2006, at 3:06 PM, Alan Hart wrote:

When I build my little Cocoa app I find copies of my header files in the Resources directories of my builds. I see no reason why this is done, but I can't find a build switch to turn it off, and I can't find any reference to it in the documentation.


The docs never come right out and say it, but if you're building anything but a framework, you shouldn't add your header files to the target.  You can add them to the project (and it's especially useful to do so for SCM, searching, and navigation purposes) but you don't have to; the Header Search Paths and #include directives will find your headers whether they're in the project or not.

If you add the headers to the target, however, they'll be processed by one of the target's build phase.  Since it doesn't make sense to compile them on their own, and you don't have a Copy Headers build phase (like frameworks do) to publish a public interface, any headers you add to an application target are treated just like any other miscellaneous file: they're treated as resources and copied in your Copy Bundle Resources build phase.

To undo this:

1) Disclose the target's build phases in the Groups and Files view
2) Select Copy Bundle Resources.  Your Detail view will show all the bundle resources.
3) Type ".h" into the Search Field to select and filter all of the header files
4) Select All in the Detail view and click Get Info to open an inspector
5) In the Targets tab of the inspector, uncheck the application target

This will remove all those headers from the target (and thus the Copy Bundle Resources build phase) but not affect compilation of the sources that use those headers, or finding or SCM management of the header files themselves.

Chris
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Header files are included in built package resources
      • From: Alan Hart <email@hidden>
References: 
 >Header files are included in built package resources (From: Alan Hart <email@hidden>)

  • Prev by Date: Re: C++ RTTI/dynamic_cast across shared module boundaries?
  • Next by Date: Re: Header files are included in built package resources
  • Previous by thread: Header files are included in built package resources
  • Next by thread: Re: Header files are included in built package resources
  • Index(es):
    • Date
    • Thread