Re: Symlinking headers instead of copying them?
Re: Symlinking headers instead of copying them?
- Subject: Re: Symlinking headers instead of copying them?
- From: Scott Tooker <email@hidden>
- Date: Thu, 26 Oct 2006 09:51:38 -0700
So it sounds like you want to have headers associated with your
frameworks at development time, but when you ship the frameworks to
users you want to keep from shipping "private" headers.
The best way to deal with this is to mark the headers as private to
the framework (select the Headers build phase of the framework target
and set the header files to have a "Private" role).
Then when you build the release version of your application and
frameworks, add a run script phase that goes through the built product
and removes the PrivateHeaders directory.
The nice thing about using the public/private distinction is that you
can support moving framework headers to the public location (Headers)
easily by changing the role of the header in the framework target.
Scott
On Oct 26, 2006, at 5:11 AM, leenoori wrote:
I stick my apps and frameworks in a shared built products location.
Sometimes when I am working inside an app I select a symbol, hit
Command-D to jump to the definition, and if I edit the file
containing the definition I find that I am inadvertently editing:
$(TARGET_BUILD_DIR)/path_to_headers/a_header.h
If I later do a clean+build, the changes get overwritten because the
framework is rebuilt and uses the older, unedited header at:
framework_source_root/a_header.h
So I am wondering if there is a way to get Xcode to symlink these
header files instead of literally copying them. They are not for
distribution to customers, so I don't need actual copies in the
framework. I doubt there's any build setting that would make Xcode
do this but I wonder if there's a way I could do it from a shell
script build phase; the trouble is, how do I dynamically get a list
of the project/private/public headers from within a shell script? I
don't want to hardcode the header names and paths.
I guess another alternative is to change my header search paths so
that instead of looking in the built copy of the framework, Xcode
looks directly in the source directories for the respective
frameworks. Hopefully then when I do a Command-D I'll be taken to
the copy of the file that I really want to edit. The only problem I
see with this method is that it will require a bit more work
manually maintaining my header search paths instead of just pointing
them at TARGET_BUILD_DIR...
Any other suggestions?
_______________________________________________
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
_______________________________________________
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