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
