I have a Mac Cocoa application that uses several custom frameworks. (Apple calls them private, it’s the frameworks that get distributed in the app bundle with your application.) Inside each framework there is a Headers
folder with the framework’s header files. These are not needed inside the resulting application bundle & I’d like to keep them private. Currently I use a Run Script build 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 the way to do it, or is there a better one?
More about my project structure: I have three Xcode projects nested in my main project, these projects have my private frameworks as their products. The frameworks are set up as a target dependency for my main target. And the last part of the setup is a Copy Files build phase that takes the frameworks and copies them into a Frameworks subfolder inside the application bundle. (Hope this is clear enough.)