Re: Timing of Build Phases
Re: Timing of Build Phases
- Subject: Re: Timing of Build Phases
- From: Greg Guerin <email@hidden>
- Date: Fri, 25 Jan 2008 13:48:13 -0700
David Dunham wrote:
>I've got some folder references that end up being copied into the
>Resources folder of the application bundle. However, Xcode doesn't
>know when files in those folders change, so it doesn't update them. In
>an attempt to work around this, I've added a Run Script build phase
>that deletes them. This is the first build phase. But it seems like
>sometimes Xcode doesn't notice that a folder needs replacing.
>
>Is there a way to synchronize this? Alternately, is there a better way
>to get Xcode to update bundle resource folders that get copied?
When I last looked into this, I found that Xcode only seems to care about
the mod-date of the top-level folder, i.e. the one you actually have as a
folder reference in the project.
If something happens to change that folder's date, e.g. rename, create,
delete, then the resources are copied. If something happens only to a file
or dir within that folder, then the resources aren't copied again.
So if I had to make a build phase or dependent target, I think I'd have it
recursively search for mod-dates later than the last build, and if any are
found, 'touch' the top-level folder. I'm more inclined to try this trick
in a separate target, rather than a build phase. I think it's more likely
to be purely sequential that way.
I don't think you can get Xcode to only copy part of the resources. It
seems to just do a blanket copy, not a piecemeal one for each item
recursively. If you wanted to copy only the changed resources, you'd
probably have to write that yourself, and eliminate the builtin Copy
Resources phase.
And please file a bug-report or RFE. It seems like we should at least have
the option of testing mod-dates recursively, even if Xcode wants to default
to only checking the top-level item's mod-date.
-- GG
_______________________________________________
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