• 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
Versioning / increasing build number
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Versioning / increasing build number


  • Subject: Versioning / increasing build number
  • From: Stefan Wolfrum <email@hidden>
  • Date: Fri, 5 Feb 2010 11:40:45 +0100

A question about versioning. Information seems a bit sparse on this according to a few Google/cocoa-dev archives/ADC/Apple Discussions searches.

I want to have a consecutive build number (an integer counting up each new build) displayed in my application (in an NSTextField, About dialog).
Now I know how to access the Main/Major program version (string) from the main bundle (CFBundleVersion). But that's not the constantly increasing integer I am looking for.

What I did so far:
- in my project settings I set "Versioning System" to "Apple Generic"
- in my project settings I set "Current Project Version" to 1

I now get a file $(PRODUCT_NAME)_vers.c built in the folder
build/$(PRODUCT_NAME).build/Debug/$(PRODUCT_NAME).build/DerivedSources

It contains two variables and it looks like I'm interested in the second
const double $(PRODUCT_NAME)VersionNumber __attribute__ ((used)) = (double)1.;

However, I still have two questions:
1) How do I get access to this const in my source code? I guess I have to declare a const as "extern" somehow somewhere?! agvtool doc says this generated c file gets linked into the binary...
2) Right now the file doesn't get built new every time I build my application. So the number isn't increasing yet. How can this be achieved?

Thanks a lot!
Stefan._______________________________________________

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

  • Follow-Ups:
    • Re: Versioning / increasing build number
      • From: "email@hidden" <email@hidden>
    • Re: Versioning / increasing build number
      • From: Stefan Wolfrum <email@hidden>
  • Prev by Date: Re: Main menu missing in 10.5. There in 10.6
  • Next by Date: Re: Main menu missing in 10.5. There in 10.6
  • Previous by thread: Re: Main menu missing in 10.5. There in 10.6
  • Next by thread: Re: Versioning / increasing build number
  • Index(es):
    • Date
    • Thread