incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shazron <shaz...@gmail.com>
Subject Re: Callback version available in platform natives and JS
Date Thu, 17 Nov 2011 22:51:59 GMT
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 <pmuellr@gmail.com> wrote:
> On Thu, Nov 17, 2011 at 14:17, Shazron <shazron@gmail.com> 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
>

Mime
View raw message