You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by Shazron <sh...@gmail.com> on 2014/04/30 22:13:55 UTC

[ios] plugin os version support

With 3.4.0, the default template only supports iOS 6.0 and up. I know that
plugins can specify iOS support (apple-ios key in engines tag) but we
haven't done it yet. I'm not even sure if the cli plugin installer checks
for this yet.

Should we start using this in core plugins?

A specific case is this PR:
https://github.com/apache/cordova-plugin-camera/pull/24
It is using [ALAssetsLibrary authorizationStatus] and that API only occurs
in iOS 6.0 and up.

Wrapping this in a runtime os version check is not hard, however
(IsAtLeastVersion macro).

Re: [ios] plugin os version support

Posted by Shazron <sh...@gmail.com>.
I agree that is the eventual goal, and that it is definitely not trivial.
Right now it's definitely based on the min version only of course.

Here's how the CLI handles the engine tag:

1.
https://github.com/apache/cordova-plugman/blob/8aca4cb5b1a8012aa23ba05386d10cb59b3b4817/src/util/default-engines.js
2.
https://github.com/apache/cordova-plugman/blob/8aca4cb5b1a8012aa23ba05386d10cb59b3b4817/src/install.js#L186-L200

I haven't tested the impact of this change in several scenarios, I'll make
sure to document and report my results if they are significant before
making any changes.


On Thu, May 1, 2014 at 5:59 AM, Ian Clelland <ic...@chromium.org> wrote:

> How would the CLI tools use this information? These sorts of dependencies
> are tricky, and involve:
>   * The minimum version of iOS required to build cordova (depends on when
> the APIs used were introduced)
>   * The maximum version of iOS supported by cordova (depends on when the
> APIs used were deprecated)
>   * The corresponding min and max versions for the plugin
>   * The versions of iOS that the developer *can* build for
>   * The version that the developer actually *wants* to build for.
>   * Oh, and also the regular plugin/engine dependencies
>
> Really, the information that we have available is the minimum iOS versions
> required for cordova-ios and for the plugin. (We don't know the maximum
> version until long after the code has been released, but it's at least as
> important)
>
> We don't have information (currently) about what versions of iOS the user
> *can* compile for, nor (maybe more importantly) what version they *want* to
> compile for.
>
> Cordova-ios 3.4.1 *supports* iOS 6 and 7. Applications built with just
> cordova *require* iOS 6.
>
> That doesn't mean that a plugin that supports iOS 5 won't work; it also
> doesn't mean that a plugin that requires iOS 7 won't work, for a particular
> app. And who knows about iOS 7.2, or 8?
>
> If our tools could support it, this is what I'd *love* to see:
>   * A way to declare in plugins a min and (optional) max iOS version, in
> plugin.xml
>   * A way to specify the ios target version when creating a project, that
> would live in config.xml
>   * A CLI that could download the right version of cordova-ios to match
> that version
>   * A plugman that could find and download the *appropriate* version of a
> plugin, or complain if one wasn't available.
>
> We're quite a long way from that today, but I'd love to get there.
>
> Ian
>
> On Wed, Apr 30, 2014 at 8:54 PM, Shazron <sh...@gmail.com> wrote:
>
> > Another motivation is to actually use it ourselves and bring light to
> this
> > feature which is underused. Inevitably there will be iOS 7 only plugins.
> > Eventually we will support only iOS 7 and 8 only, etc
> >
> > On Wednesday, April 30, 2014, Shazron <sh...@gmail.com> wrote:
> >
> > > It's also informational - so it has some value for plain human eyes
> > > (browsing the registry for example) vs automatons
> > >
> > > On Wednesday, April 30, 2014, Michal Mocny <mmocny@chromium.org
> > <javascript:_e(%7B%7D,'cvml','mmocny@chromium.org');>>
> > > wrote:
> > >
> > >> Why do we need to do that?
> > >>
> > >> If the cordova-ios template support iOS 6+, don't we only need to
> update
> > >> the cordova engine requirements?  If you are using an older
> cordova-ios
> > >> platform (that still supported iOS5), then would you be using a CLI
> that
> > >> understood apple-ios engine tag?
> > >>
> > >> -Michal
> > >>
> > >>
> > >> On Wed, Apr 30, 2014 at 4:54 PM, Shazron <sh...@gmail.com> wrote:
> > >>
> > >> > I agree of course, now comes the part where we add the "apple-ios"
> key
> > >> into
> > >> > the engines tag for all plugins. We can add 6.0 for everything or
> > >> actually
> > >> > test whether it actually needs 6.0 (more work, requires testing with
> > an
> > >> > older Cordova version, and Xcode version that has the iOS 5 SDK....)
> > >> >
> > >> >
> > >> > On Wed, Apr 30, 2014 at 1:47 PM, Michal Mocny <mm...@chromium.org>
> > >> wrote:
> > >> >
> > >> > > https://developer.apple.com/support/appstore/
> > >> > >
> > >> > > iOS <6 = 2%.  That meets the criteria we've used in the past..
> > >> > >
> > >> > >
> > >> > > On Wed, Apr 30, 2014 at 4:13 PM, Shazron <sh...@gmail.com>
> wrote:
> > >> > >
> > >> > > > With 3.4.0, the default template only supports iOS 6.0 and up. I
> > >> know
> > >> > > that
> > >> > > > plugins can specify iOS support (apple-ios key in engines tag)
> but
> > >> we
> > >> > > > haven't done it yet. I'm not even sure if the cli plugin
> installer
> > >> > checks
> > >> > > > for this yet.
> > >> > > >
> > >> > > > Should we start using this in core plugins?
> > >> > > >
> > >> > > > A specific case is this PR:
> > >> > > > https://github.com/apache/cordova-plugin-camera/pull/24
> > >> > > > It is using [ALAssetsLibrary authorizationStatus] and that API
> > only
> > >> > > occurs
> > >> > > > in iOS 6.0 and up.
> > >> > > >
> > >> > > > Wrapping this in a runtime os version check is not hard, however
> > >> > > > (IsAtLeastVersion macro).
> > >> > > >
> > >> > >
> > >> >
> > >>
> > >
> >
>

Re: [ios] plugin os version support

Posted by Ian Clelland <ic...@chromium.org>.
How would the CLI tools use this information? These sorts of dependencies
are tricky, and involve:
  * The minimum version of iOS required to build cordova (depends on when
the APIs used were introduced)
  * The maximum version of iOS supported by cordova (depends on when the
APIs used were deprecated)
  * The corresponding min and max versions for the plugin
  * The versions of iOS that the developer *can* build for
  * The version that the developer actually *wants* to build for.
  * Oh, and also the regular plugin/engine dependencies

Really, the information that we have available is the minimum iOS versions
required for cordova-ios and for the plugin. (We don't know the maximum
version until long after the code has been released, but it's at least as
important)

We don't have information (currently) about what versions of iOS the user
*can* compile for, nor (maybe more importantly) what version they *want* to
compile for.

Cordova-ios 3.4.1 *supports* iOS 6 and 7. Applications built with just
cordova *require* iOS 6.

That doesn't mean that a plugin that supports iOS 5 won't work; it also
doesn't mean that a plugin that requires iOS 7 won't work, for a particular
app. And who knows about iOS 7.2, or 8?

If our tools could support it, this is what I'd *love* to see:
  * A way to declare in plugins a min and (optional) max iOS version, in
plugin.xml
  * A way to specify the ios target version when creating a project, that
would live in config.xml
  * A CLI that could download the right version of cordova-ios to match
that version
  * A plugman that could find and download the *appropriate* version of a
plugin, or complain if one wasn't available.

We're quite a long way from that today, but I'd love to get there.

Ian

On Wed, Apr 30, 2014 at 8:54 PM, Shazron <sh...@gmail.com> wrote:

> Another motivation is to actually use it ourselves and bring light to this
> feature which is underused. Inevitably there will be iOS 7 only plugins.
> Eventually we will support only iOS 7 and 8 only, etc
>
> On Wednesday, April 30, 2014, Shazron <sh...@gmail.com> wrote:
>
> > It's also informational - so it has some value for plain human eyes
> > (browsing the registry for example) vs automatons
> >
> > On Wednesday, April 30, 2014, Michal Mocny <mmocny@chromium.org
> <javascript:_e(%7B%7D,'cvml','mmocny@chromium.org');>>
> > wrote:
> >
> >> Why do we need to do that?
> >>
> >> If the cordova-ios template support iOS 6+, don't we only need to update
> >> the cordova engine requirements?  If you are using an older cordova-ios
> >> platform (that still supported iOS5), then would you be using a CLI that
> >> understood apple-ios engine tag?
> >>
> >> -Michal
> >>
> >>
> >> On Wed, Apr 30, 2014 at 4:54 PM, Shazron <sh...@gmail.com> wrote:
> >>
> >> > I agree of course, now comes the part where we add the "apple-ios" key
> >> into
> >> > the engines tag for all plugins. We can add 6.0 for everything or
> >> actually
> >> > test whether it actually needs 6.0 (more work, requires testing with
> an
> >> > older Cordova version, and Xcode version that has the iOS 5 SDK....)
> >> >
> >> >
> >> > On Wed, Apr 30, 2014 at 1:47 PM, Michal Mocny <mm...@chromium.org>
> >> wrote:
> >> >
> >> > > https://developer.apple.com/support/appstore/
> >> > >
> >> > > iOS <6 = 2%.  That meets the criteria we've used in the past..
> >> > >
> >> > >
> >> > > On Wed, Apr 30, 2014 at 4:13 PM, Shazron <sh...@gmail.com> wrote:
> >> > >
> >> > > > With 3.4.0, the default template only supports iOS 6.0 and up. I
> >> know
> >> > > that
> >> > > > plugins can specify iOS support (apple-ios key in engines tag) but
> >> we
> >> > > > haven't done it yet. I'm not even sure if the cli plugin installer
> >> > checks
> >> > > > for this yet.
> >> > > >
> >> > > > Should we start using this in core plugins?
> >> > > >
> >> > > > A specific case is this PR:
> >> > > > https://github.com/apache/cordova-plugin-camera/pull/24
> >> > > > It is using [ALAssetsLibrary authorizationStatus] and that API
> only
> >> > > occurs
> >> > > > in iOS 6.0 and up.
> >> > > >
> >> > > > Wrapping this in a runtime os version check is not hard, however
> >> > > > (IsAtLeastVersion macro).
> >> > > >
> >> > >
> >> >
> >>
> >
>

Re: [ios] plugin os version support

Posted by Shazron <sh...@gmail.com>.
Another motivation is to actually use it ourselves and bring light to this
feature which is underused. Inevitably there will be iOS 7 only plugins.
Eventually we will support only iOS 7 and 8 only, etc

On Wednesday, April 30, 2014, Shazron <sh...@gmail.com> wrote:

> It's also informational - so it has some value for plain human eyes
> (browsing the registry for example) vs automatons
>
> On Wednesday, April 30, 2014, Michal Mocny <mmocny@chromium.org<javascript:_e(%7B%7D,'cvml','mmocny@chromium.org');>>
> wrote:
>
>> Why do we need to do that?
>>
>> If the cordova-ios template support iOS 6+, don't we only need to update
>> the cordova engine requirements?  If you are using an older cordova-ios
>> platform (that still supported iOS5), then would you be using a CLI that
>> understood apple-ios engine tag?
>>
>> -Michal
>>
>>
>> On Wed, Apr 30, 2014 at 4:54 PM, Shazron <sh...@gmail.com> wrote:
>>
>> > I agree of course, now comes the part where we add the "apple-ios" key
>> into
>> > the engines tag for all plugins. We can add 6.0 for everything or
>> actually
>> > test whether it actually needs 6.0 (more work, requires testing with an
>> > older Cordova version, and Xcode version that has the iOS 5 SDK....)
>> >
>> >
>> > On Wed, Apr 30, 2014 at 1:47 PM, Michal Mocny <mm...@chromium.org>
>> wrote:
>> >
>> > > https://developer.apple.com/support/appstore/
>> > >
>> > > iOS <6 = 2%.  That meets the criteria we've used in the past..
>> > >
>> > >
>> > > On Wed, Apr 30, 2014 at 4:13 PM, Shazron <sh...@gmail.com> wrote:
>> > >
>> > > > With 3.4.0, the default template only supports iOS 6.0 and up. I
>> know
>> > > that
>> > > > plugins can specify iOS support (apple-ios key in engines tag) but
>> we
>> > > > haven't done it yet. I'm not even sure if the cli plugin installer
>> > checks
>> > > > for this yet.
>> > > >
>> > > > Should we start using this in core plugins?
>> > > >
>> > > > A specific case is this PR:
>> > > > https://github.com/apache/cordova-plugin-camera/pull/24
>> > > > It is using [ALAssetsLibrary authorizationStatus] and that API only
>> > > occurs
>> > > > in iOS 6.0 and up.
>> > > >
>> > > > Wrapping this in a runtime os version check is not hard, however
>> > > > (IsAtLeastVersion macro).
>> > > >
>> > >
>> >
>>
>

Re: [ios] plugin os version support

Posted by Shazron <sh...@gmail.com>.
It's also informational - so it has some value for plain human eyes
(browsing the registry for example) vs automatons

On Wednesday, April 30, 2014, Michal Mocny <mm...@chromium.org> wrote:

> Why do we need to do that?
>
> If the cordova-ios template support iOS 6+, don't we only need to update
> the cordova engine requirements?  If you are using an older cordova-ios
> platform (that still supported iOS5), then would you be using a CLI that
> understood apple-ios engine tag?
>
> -Michal
>
>
> On Wed, Apr 30, 2014 at 4:54 PM, Shazron <shazron@gmail.com <javascript:;>>
> wrote:
>
> > I agree of course, now comes the part where we add the "apple-ios" key
> into
> > the engines tag for all plugins. We can add 6.0 for everything or
> actually
> > test whether it actually needs 6.0 (more work, requires testing with an
> > older Cordova version, and Xcode version that has the iOS 5 SDK....)
> >
> >
> > On Wed, Apr 30, 2014 at 1:47 PM, Michal Mocny <mmocny@chromium.org<javascript:;>>
> wrote:
> >
> > > https://developer.apple.com/support/appstore/
> > >
> > > iOS <6 = 2%.  That meets the criteria we've used in the past..
> > >
> > >
> > > On Wed, Apr 30, 2014 at 4:13 PM, Shazron <shazron@gmail.com<javascript:;>>
> wrote:
> > >
> > > > With 3.4.0, the default template only supports iOS 6.0 and up. I know
> > > that
> > > > plugins can specify iOS support (apple-ios key in engines tag) but we
> > > > haven't done it yet. I'm not even sure if the cli plugin installer
> > checks
> > > > for this yet.
> > > >
> > > > Should we start using this in core plugins?
> > > >
> > > > A specific case is this PR:
> > > > https://github.com/apache/cordova-plugin-camera/pull/24
> > > > It is using [ALAssetsLibrary authorizationStatus] and that API only
> > > occurs
> > > > in iOS 6.0 and up.
> > > >
> > > > Wrapping this in a runtime os version check is not hard, however
> > > > (IsAtLeastVersion macro).
> > > >
> > >
> >
>

Re: [ios] plugin os version support

Posted by Michal Mocny <mm...@chromium.org>.
Why do we need to do that?

If the cordova-ios template support iOS 6+, don't we only need to update
the cordova engine requirements?  If you are using an older cordova-ios
platform (that still supported iOS5), then would you be using a CLI that
understood apple-ios engine tag?

-Michal


On Wed, Apr 30, 2014 at 4:54 PM, Shazron <sh...@gmail.com> wrote:

> I agree of course, now comes the part where we add the "apple-ios" key into
> the engines tag for all plugins. We can add 6.0 for everything or actually
> test whether it actually needs 6.0 (more work, requires testing with an
> older Cordova version, and Xcode version that has the iOS 5 SDK....)
>
>
> On Wed, Apr 30, 2014 at 1:47 PM, Michal Mocny <mm...@chromium.org> wrote:
>
> > https://developer.apple.com/support/appstore/
> >
> > iOS <6 = 2%.  That meets the criteria we've used in the past..
> >
> >
> > On Wed, Apr 30, 2014 at 4:13 PM, Shazron <sh...@gmail.com> wrote:
> >
> > > With 3.4.0, the default template only supports iOS 6.0 and up. I know
> > that
> > > plugins can specify iOS support (apple-ios key in engines tag) but we
> > > haven't done it yet. I'm not even sure if the cli plugin installer
> checks
> > > for this yet.
> > >
> > > Should we start using this in core plugins?
> > >
> > > A specific case is this PR:
> > > https://github.com/apache/cordova-plugin-camera/pull/24
> > > It is using [ALAssetsLibrary authorizationStatus] and that API only
> > occurs
> > > in iOS 6.0 and up.
> > >
> > > Wrapping this in a runtime os version check is not hard, however
> > > (IsAtLeastVersion macro).
> > >
> >
>

Re: [ios] plugin os version support

Posted by Shazron <sh...@gmail.com>.
I agree of course, now comes the part where we add the "apple-ios" key into
the engines tag for all plugins. We can add 6.0 for everything or actually
test whether it actually needs 6.0 (more work, requires testing with an
older Cordova version, and Xcode version that has the iOS 5 SDK....)


On Wed, Apr 30, 2014 at 1:47 PM, Michal Mocny <mm...@chromium.org> wrote:

> https://developer.apple.com/support/appstore/
>
> iOS <6 = 2%.  That meets the criteria we've used in the past..
>
>
> On Wed, Apr 30, 2014 at 4:13 PM, Shazron <sh...@gmail.com> wrote:
>
> > With 3.4.0, the default template only supports iOS 6.0 and up. I know
> that
> > plugins can specify iOS support (apple-ios key in engines tag) but we
> > haven't done it yet. I'm not even sure if the cli plugin installer checks
> > for this yet.
> >
> > Should we start using this in core plugins?
> >
> > A specific case is this PR:
> > https://github.com/apache/cordova-plugin-camera/pull/24
> > It is using [ALAssetsLibrary authorizationStatus] and that API only
> occurs
> > in iOS 6.0 and up.
> >
> > Wrapping this in a runtime os version check is not hard, however
> > (IsAtLeastVersion macro).
> >
>

Re: [ios] plugin os version support

Posted by Michal Mocny <mm...@chromium.org>.
https://developer.apple.com/support/appstore/

iOS <6 = 2%.  That meets the criteria we've used in the past..


On Wed, Apr 30, 2014 at 4:13 PM, Shazron <sh...@gmail.com> wrote:

> With 3.4.0, the default template only supports iOS 6.0 and up. I know that
> plugins can specify iOS support (apple-ios key in engines tag) but we
> haven't done it yet. I'm not even sure if the cli plugin installer checks
> for this yet.
>
> Should we start using this in core plugins?
>
> A specific case is this PR:
> https://github.com/apache/cordova-plugin-camera/pull/24
> It is using [ALAssetsLibrary authorizationStatus] and that API only occurs
> in iOS 6.0 and up.
>
> Wrapping this in a runtime os version check is not hard, however
> (IsAtLeastVersion macro).
>