• 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: Date compiled?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Date compiled?


  • Subject: Re: Date compiled?
  • From: Jens Alfke <email@hidden>
  • Date: Tue, 27 May 2008 09:15:32 -0700


On 27 May '08, at 8:48 AM, Uli Kusterer wrote:

You'll need a shell script build phase that does a 'touch' on that header, though. Since the header hasn't changed, it will otherwise not be recompiled, and in turn you'll have the old date in your build. If you do that, you might as well just create a shell script that writes the header anew each time, which gives you full control over the date format.

That does slow down builds somewhat, as any source file including that header has to be recompiled every time. And it means no build will be a no-op, even if no sources have changed — i.e. if you hit Cmd-B several times in a row, each time Xcode will compile and link. (Unless your shell script is smart enough to update the header only once a day, or once an hour.)


You could also generate a text or plist file instead of a header, and just have that copied into the app, then read it at runtime.

Which leads me to think: Xcode already applies some variable substitutions to the Info.plist file when it builds the app (the copy in your project probably has variables like ${EXECUTABLE_NAME}" in it. I wonder if there's a variable that has the date?

—Jens

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Date compiled? (From: Jeff LaMarche <email@hidden>)
 >Re: Date compiled? (From: Thomas Davie <email@hidden>)
 >Re: Date compiled? (From: Uli Kusterer <email@hidden>)

  • Prev by Date: Re: 'Inheriting' a NSDateFormatterStyle
  • Next by Date: Re: Date compiled?
  • Previous by thread: Re: Date compiled?
  • Next by thread: Re: Date compiled?
  • Index(es):
    • Date
    • Thread