cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Grieve (JIRA)" <>
Subject [jira] [Commented] (CB-4036) <platform> tag should have a "version" attribute
Date Fri, 02 Aug 2013 20:39:48 GMT


Andrew Grieve commented on CB-4036:

Just created CB-4490 for adding separate version checks for cordova-ios vs cordova-android.

Made me think that we should *not* add these versions to <platform> tags, and instead
add them to <engines>

e.g. What if you had multiple <platform name="ios"> tags? Is there a use-case for that?
Might want that if you are going to define all of your JS for all platforms, and then later
define all of your assets per-platform?

Having the sdk & os checks in <engines> would also serve to put all version info
in the same place:

  <engine name="cordova-plugman" version=">=3.1.0" />
  <engine name="cordova-ios" version=">=3.0.0" />
  <engine name="apple-xcode" version=">=4.6" />
  <engine name="apple-ios" version=">=6.0" />

OTOH, having versions in the <platform> tag might serve more as a conditional. E.g.

<platform min-ios-sdk="4.6"> ... some source files </platform>
<platform min-ios-sdk="4.7"> ... some additional source files </platform>

> <platform> tag should have a "version" attribute 
> -------------------------------------------------
>                 Key: CB-4036
>                 URL:
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: Plugman
>            Reporter: Shazron Abdullah
>            Assignee: Filip Maj
> This might be hole that we didn't consider.
> I know implicitly if the plugin supported an "engine" version we support what the engine
supports, but here could be one scenario.
> For example, with iOS 7, a plugin CDVFooBar use this awesome NSWhizBang framework. Fine,
with iOS 7, you have to of course build with the iOS 7 SDK, and you can support iOS 6 with
a Deploy Target build setting.
> It runs on iOS 7 - yay.
> It.. blows up on iOS 6 at runtime, because of course NSWhizBang framework does not exist
on iOS 6.
> Now you say, why don't you do Obj-C runtime checks and weak link the framework? Yes,
the plugin author can do that but a plugin user, by parsing the plugin xml (using a tool,
or optically, whatever) cannot know that the plugin does NOT work on iOS 6 - and even though
it "runs" on iOS 6, it does nothing, which is useless and wastes a lot of time.
> So - my proposal is, to add a *"version"* attribute on the *<platform>* tag. It
should follow the syntax for the <engine> version attribute. 
> What would be the default if the version attribute is not there? Not sure what a reasonable
default is yet.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message