Re: Version string for xcode itself
Re: Version string for xcode itself
- Subject: Re: Version string for xcode itself
- From: Ken Thomases <email@hidden>
- Date: Mon, 01 Feb 2016 16:15:52 -0600
On Feb 1, 2016, at 3:49 PM, Jonathan Taylor <email@hidden> wrote:
>
> Can anybody tell me a compiler macro that will get me the version string of Xcode itself? My attempts to google this are getting swamped by things that are not what I am looking for.
>
> I'd like to use this to provide information about the build environment with which the code was built, in addition to information about the version of my code that was being built (which I already have). Can anyone advise?
There's the __VERSION__ macro, whose value is "4.2.1 Compatible Apple LLVM 7.0.2 (clang-700.1.81)" for Xcode 7.2. This is really about the compiler, not Xcode itself.
There are build settings, which are not automatically available as macros, but which you can use to set macros. The build settings are:
PLATFORM_PRODUCT_BUILD_VERSION=7C68
XCODE_PRODUCT_BUILD_VERSION=7C68
XCODE_VERSION_ACTUAL=0720
XCODE_VERSION_MAJOR=0700
XCODE_VERSION_MINOR=0720
You can put references to those in the build setting for preprocessor macros, like so:
XCODE_VERSION_ACTUAL=\"$XCODE_VERSION_ACTUAL\"
(That makes it a string because otherwise it's likely to be interpreted as an octal or hex number.)
Regards,
Ken
_______________________________________________
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