For #defines perhaps we can take a cue on how Apple does it. In Xcode --> File --> Open Quickly... --> type in "Availability.h".
http://www.opensource.apple.com/source/CarbonHeaders/CarbonHeaders-18.1/Availability.h http://www.opensource.apple.com/source/CarbonHeaders/CarbonHeaders-18.1/AvailabilityInternal.h On Thu, Nov 17, 2011 at 1:07 PM, Patrick Mueller <[email protected]> wrote: > On Thu, Nov 17, 2011 at 14:17, Shazron <[email protected]> wrote: > >> For iOS, there is a version method available in native code as well: >> >> https://github.com/callback/callback-ios/blob/master/PhoneGapLib/Classes/PhoneGapDelegate.m#L149-170 >> >> Only a runtime approach - so from a plugin, you would call: >> NSString* pgVersion = [PhoneGapDelegate phoneGapVersion]; >> >> There are currently two ways that the library gets the version - one >> is through a build preprocessor macro (this is for PhoneGap.framework, >> version is baked in), one from reading from the VERSION file (legacy >> code - mainly for Xcode 3 based projects). >> > > In this particular case, I actually needed the version at the time the > preprocessor is invoked. The runtime version wouldn't have helped. Nor > would the VERSION file, I don't think. > > -- > Patrick Mueller > http://muellerware.org >
