My favorites | Sign in
Project Home Wiki Issues Source
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 4: Use apple-generic versioning system and expose version number
2 people starred this issue and may be notified of changes. Back to list
Status:  New
Owner:  ----


Sign in to add a comment
 
Reported by cmhena...@gmail.com, Aug 17, 2008
It might be useful to expose a framework version number from TODParseKit.h; this will be easy 
if you set the versioning system to apple-generic.  Here's how:

(1) Set the "Versioning System" build setting on the framework target to apple-generic.

(2) Quit Xcode, and run "agvtool new-version -all 1" from the command line within the directory 
containing TODParseKit.xcodeproj.  This will set the Current Project Version build setting as well 
as the CFBundleVersion in each Info.plist to 1.

(3) Re-open Xcode, and add "extern double TODParseKitVersionNumber;" to the end of the 
"TODParseKit.h" public header.

You don't actually need to do anything else.  When Xcode builds your project, it will automatically 
also build a "TODParseKit_vers.c" file that provides a definition for the 
TODParseKitVersionNumber global.

This will start with a value of 1.0, and will reflect whatever the Current Project Version build 
setting is configured to be when the target is built.  (Note that it's a double, not a string, so it's a 
"build version" rather than a "marketing version.")

You can use this information to allow clients to check the version number of the framework for 
backwards- and forwards-compatibility purposes.  See <AppKit/NSBrowser.h> for some 
examples of how this is used with the Cocoa AppKit.
Sign in to add a comment

Powered by Google Project Hosting