How to remove headers from custom frameworks?

I have a Cocoa Mac application that uses several custom frameworks. (Apple calls them private, these are the frames that are distributed in the application bundle with your application.) Inside each framework there is a Headers folder with the header files of the frameworks. They are not needed inside the resulting application package, and Id - as private. I am currently using the Script run phase with the following line:

 # Remove all headers from our private frameworks find "${TARGET_BUILD_DIR}" -name Headers -print0 | xargs -0 rm -rf 

Is this a way to do this, or is there a better one?


More about my project structure: I have three Xcode projects embedded in my main project, these projects have my private structures as their products. The framework is configured as a target dependency for my primary purpose. And the last part of the setup is the Copy Files build phase, which takes the frameworks and copies them to the Frameworks subfolder inside the application package. (Hope this is clear enough.)

+4
source share
1 answer

you probably have a build phase for the copy headers for your frame. You can:

1) delete it,

2) individually indicate the visibility of the headers in ide,

3) or add / remove them from the copy header phase

I just set my goals as build dependencies using:

  • custom search paths for headers
  • copy phase for fmwk
  • no copy header phases

you can do it differently (for example, only to build fmwk explicitly or to export some headers).

if you (in the end) do not get a satisfactory answer, additional information about the structures of your projects can help, as there are several ways to configure this.

luck

+2
source

All Articles