You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by Brian LeRoux <b...@brian.io> on 2012/10/19 20:24:00 UTC

enhancing the plugin lifecycle for ios

Regarding:

https://github.com/alunny/cordova-plugin-spec/issues/5#issuecomment-9582705

Looks like we do not have a lifecycle event for app launch/create in iOS land:

https://github.com/apache/incubator-cordova-ios/blob/master/CordovaLib/Classes/CDVPlugin.h

Any objections/concerns for having something like the Android plugin
init method?

https://github.com/apache/incubator-cordova-android/blob/master/framework/src/org/apache/cordova/api/CordovaPlugin.java#L39

Re: enhancing the plugin lifecycle for ios

Posted by Ally Ogilvie <ao...@wizcorp.jp>.
I agree entirely with your logic. For ..
>core APIs in Cordova

I can think use cases where a stripped down "Cordova Lite" if you will,
could be required...
But I expect that customisation of core APIs to happen during the
custom/script build phase of a Cordova framework or lib

As a end user/developer I should not care about the core APIs too much. I
think the use case above is really for power users with a specific use case.
Most developers would expect all core APIs to just be available on demand~

For 3rd party plugins > plugins that boot ridiculous amounts of native SDKs
on deviceready() (if done in non blocking code), IMHO would show no major
performance increase in comparison with booting SDKs in parallel with
Codvova's native APIs.

On the other hand something that I am updating right now is this;
https://github.com/Wizcorp/phonegap-plugin-wizAnalytics (which is why I am
particularly interested in this thread...)

For me, this thread can be summarised in the following riddle;
If my app has 10 advertising SDKs that log session and event information
from my webapp.. (using a Cordova 3rd party plugin - wizAnalytics in this
case...)
*when should I boot the SDKs so I can log my first session?*





On Mon, Oct 22, 2012 at 1:11 PM, Filip Maj <fi...@adobe.com> wrote:

> Think of all of the core APIs in Cordova. A couple of them (device info,
> network connection + info) are required before deviceready fires. If we
> shed all of the core APIs and eventually adopt a 100% plugin-based
> architecture (where cordova is composed of only the bridge between the
> webview and native), then we end up composing a hybrid container with
> arbitrary APIs. Some of those may or may not be available when the app
> loads up, so defining the ability to lazily or eagerly load plugins is a
> good idea.
>
> On 10/21/12 9:02 PM, "Ally Ogilvie" <ao...@wizcorp.jp> wrote:
>
> >Is there a point to having / making a plugin that is ready to use before
> >deviceready() ...
> >BUT not actually possible to comunicate with until deviceready() ?
> >:)
> >
> >
> >
> >On Mon, Oct 22, 2012 at 12:49 PM, Filip Maj <fi...@adobe.com> wrote:
> >
> >> One example: plugins that need to be eagerly-loaded could be required
> >> before deviceready fires, so attaching to deviceready might not be an
> >> option :)
> >>
> >> On 10/21/12 6:40 PM, "Ally Ogilvie" <ao...@wizcorp.jp> wrote:
> >>
> >> >+1 lazy load.
> >> >Start up times can be critical to some apps.
> >> >Booting a plugin from device ready() in JS or init /
> >> >applicationDidFinishLaunchBlah in iOS is not enough for someone?
> >> >
> >> >
> >> >On Sat, Oct 20, 2012 at 7:14 AM, Brian LeRoux <b...@brian.io> wrote:
> >> >
> >> >> Koolaide, I added a subtask.
> >> >>
> >> >> On Fri, Oct 19, 2012 at 3:02 PM, Shazron <sh...@gmail.com> wrote:
> >> >> > We  have https://issues.apache.org/jira/browse/CB-1108 for 2.3.0
> >> >> >
> >> >> > On Fri, Oct 19, 2012 at 1:39 PM, Brian LeRoux <b...@brian.io> wrote:
> >> >> >> Thats cool. Is the config.xml thing in jira? (Maybe add as
> >>subtask if
> >> >> so?)
> >> >> >>
> >> >> >> On Fri, Oct 19, 2012 at 12:48 PM, Shazron <sh...@gmail.com>
> >>wrote:
> >> >> >>> Dave - no we did not. We discussed it in the markmail thread I
> >> >>linked
> >> >> >>> to, but never did implement it.
> >> >> >>>
> >> >> >>> On Fri, Oct 19, 2012 at 12:41 PM, Dave Johnson <
> >> >> dave.c.johnson@gmail.com> wrote:
> >> >> >>>> Hey Shaz I thought that that we did the same thing with iOS as
> >>the
> >> >> >>>> onload thing in Java land?
> >> >> >>>>
> >> >> >>>> -d
> >> >> >>>>
> >> >> >>>> On Fri, Oct 19, 2012 at 12:02 PM, Shazron <sh...@gmail.com>
> >> >>wrote:
> >> >> >>>>> We can do the same for iOS once we move to config.xml. Should
> >>we
> >> >> wait till then?
> >> >> >>>>>
> >> >> >>>>> On Fri, Oct 19, 2012 at 11:58 AM, Filip Maj <fi...@adobe.com>
> >> wrote:
> >> >> >>>>>> Plugin Manager in java land loads plugins defined with the
> >> >>'onload'
> >> >> >>>>>> attribute right away, otherwise lazy loads them.
> >> >> >>>>>>
> >> >> >>>>>>
> >> >>
> >> >>
> >>
> >>
> https://github.com/apache/incubator-cordova-android/blob/master/framework
> >> >>/s
> >> >> >>>>>> rc/org/apache/cordova/api/PluginManager.java#L189
> >> >> >>>>>>
> >> >> >>>>>>
> >> >> >>>>>> On 10/19/12 11:54 AM, "Shazron" <sh...@gmail.com> wrote:
> >> >> >>>>>>
> >> >> >>>>>>>This is possible if somehow we can set which plugins can be
> >> >>"loaded"
> >> >> >>>>>>>at startup (or should all of them be loaded? seems wasteful).
> >> >>Right
> >> >> >>>>>>>now they are lazily loaded (on first use), so sending them a
> >> >> >>>>>>>"onAppLaunch" event (or equivalent) would do nothing since
> >>they
> >> >>are
> >> >> >>>>>>>not listening of course.
> >> >> >>>>>>>
> >> >> >>>>>>>Now's a good time to resurrect this old thread :)
> >> >> >>>>>>>http://markmail.org/thread/hq2rd5lobbl4nkav
> >> >> >>>>>>>I like Patrick Mueller's suggestion in that thread - but we
> >>are
> >> >> >>>>>>>migrating to config.xml (no ETA) so...
> >> >> >>>>>>>
> >> >> >>>>>>>On Fri, Oct 19, 2012 at 11:24 AM, Brian LeRoux <b...@brian.io>
> >> >>wrote:
> >> >> >>>>>>>> Regarding:
> >> >> >>>>>>>>
> >> >> >>>>>>>>
> >> >> >>>>>>>>
> >> >>
> >> >>
> >>
> >>
> https://github.com/alunny/cordova-plugin-spec/issues/5#issuecomment-95827
> >> >> >>>>>>>>05
> >> >> >>>>>>>>
> >> >> >>>>>>>> Looks like we do not have a lifecycle event for app
> >> >>launch/create
> >> >> in
> >> >> >>>>>>>>iOS land:
> >> >> >>>>>>>>
> >> >> >>>>>>>>
> >> >> >>>>>>>>
> >> >>
> >> >>
> >>
> >>
> https://github.com/apache/incubator-cordova-ios/blob/master/CordovaLib/Cl
> >> >> >>>>>>>>asses/CDVPlugin.h
> >> >> >>>>>>>>
> >> >> >>>>>>>> Any objections/concerns for having something like the
> >>Android
> >> >> plugin
> >> >> >>>>>>>> init method?
> >> >> >>>>>>>>
> >> >> >>>>>>>>
> >> >> >>>>>>>>
> >> >>
> >> >>
> >>
> >>
> https://github.com/apache/incubator-cordova-android/blob/master/framework
> >> >> >>>>>>>>/src/org/apache/cordova/api/CordovaPlugin.java#L39
> >> >> >>>>>>
> >> >>
> >> >
> >> >
> >> >
> >> >--
> >> > [image: Wizcorp - Incorporated Wizards!]
> >> > Ally Ogilvie
> >> >Lead Developer for Mobile Devices
> >> >
> >> >
> >> >
> >> >   wizcorp.jp
> >> >
> >> >3-10-14-6F, Higashi Nihombashi, Chuo-ku, 103-0004, Tokyo
> >> >Tel: (+81)3-4550-1448 - E-mail: aogilvie@wizcorp.jp
> >>
> >>
> >
> >
> >--
> > [image: Wizcorp - Incorporated Wizards!]
> > Ally Ogilvie
> >Lead Developer for Mobile Devices
> >
> >
> >
> >   wizcorp.jp
> >
> >3-10-14-6F, Higashi Nihombashi, Chuo-ku, 103-0004, Tokyo
> >Tel: (+81)3-4550-1448 - E-mail: aogilvie@wizcorp.jp
>
>


-- 
 [image: Wizcorp - Incorporated Wizards!]
 Ally Ogilvie
Lead Developer for Mobile Devices



   wizcorp.jp

3-10-14-6F, Higashi Nihombashi, Chuo-ku, 103-0004, Tokyo
Tel: (+81)3-4550-1448 - E-mail: aogilvie@wizcorp.jp

Re: enhancing the plugin lifecycle for ios

Posted by Filip Maj <fi...@adobe.com>.
Think of all of the core APIs in Cordova. A couple of them (device info,
network connection + info) are required before deviceready fires. If we
shed all of the core APIs and eventually adopt a 100% plugin-based
architecture (where cordova is composed of only the bridge between the
webview and native), then we end up composing a hybrid container with
arbitrary APIs. Some of those may or may not be available when the app
loads up, so defining the ability to lazily or eagerly load plugins is a
good idea.

On 10/21/12 9:02 PM, "Ally Ogilvie" <ao...@wizcorp.jp> wrote:

>Is there a point to having / making a plugin that is ready to use before
>deviceready() ...
>BUT not actually possible to comunicate with until deviceready() ?
>:)
>
>
>
>On Mon, Oct 22, 2012 at 12:49 PM, Filip Maj <fi...@adobe.com> wrote:
>
>> One example: plugins that need to be eagerly-loaded could be required
>> before deviceready fires, so attaching to deviceready might not be an
>> option :)
>>
>> On 10/21/12 6:40 PM, "Ally Ogilvie" <ao...@wizcorp.jp> wrote:
>>
>> >+1 lazy load.
>> >Start up times can be critical to some apps.
>> >Booting a plugin from device ready() in JS or init /
>> >applicationDidFinishLaunchBlah in iOS is not enough for someone?
>> >
>> >
>> >On Sat, Oct 20, 2012 at 7:14 AM, Brian LeRoux <b...@brian.io> wrote:
>> >
>> >> Koolaide, I added a subtask.
>> >>
>> >> On Fri, Oct 19, 2012 at 3:02 PM, Shazron <sh...@gmail.com> wrote:
>> >> > We  have https://issues.apache.org/jira/browse/CB-1108 for 2.3.0
>> >> >
>> >> > On Fri, Oct 19, 2012 at 1:39 PM, Brian LeRoux <b...@brian.io> wrote:
>> >> >> Thats cool. Is the config.xml thing in jira? (Maybe add as
>>subtask if
>> >> so?)
>> >> >>
>> >> >> On Fri, Oct 19, 2012 at 12:48 PM, Shazron <sh...@gmail.com>
>>wrote:
>> >> >>> Dave - no we did not. We discussed it in the markmail thread I
>> >>linked
>> >> >>> to, but never did implement it.
>> >> >>>
>> >> >>> On Fri, Oct 19, 2012 at 12:41 PM, Dave Johnson <
>> >> dave.c.johnson@gmail.com> wrote:
>> >> >>>> Hey Shaz I thought that that we did the same thing with iOS as
>>the
>> >> >>>> onload thing in Java land?
>> >> >>>>
>> >> >>>> -d
>> >> >>>>
>> >> >>>> On Fri, Oct 19, 2012 at 12:02 PM, Shazron <sh...@gmail.com>
>> >>wrote:
>> >> >>>>> We can do the same for iOS once we move to config.xml. Should
>>we
>> >> wait till then?
>> >> >>>>>
>> >> >>>>> On Fri, Oct 19, 2012 at 11:58 AM, Filip Maj <fi...@adobe.com>
>> wrote:
>> >> >>>>>> Plugin Manager in java land loads plugins defined with the
>> >>'onload'
>> >> >>>>>> attribute right away, otherwise lazy loads them.
>> >> >>>>>>
>> >> >>>>>>
>> >>
>> >>
>> 
>>https://github.com/apache/incubator-cordova-android/blob/master/framework
>> >>/s
>> >> >>>>>> rc/org/apache/cordova/api/PluginManager.java#L189
>> >> >>>>>>
>> >> >>>>>>
>> >> >>>>>> On 10/19/12 11:54 AM, "Shazron" <sh...@gmail.com> wrote:
>> >> >>>>>>
>> >> >>>>>>>This is possible if somehow we can set which plugins can be
>> >>"loaded"
>> >> >>>>>>>at startup (or should all of them be loaded? seems wasteful).
>> >>Right
>> >> >>>>>>>now they are lazily loaded (on first use), so sending them a
>> >> >>>>>>>"onAppLaunch" event (or equivalent) would do nothing since
>>they
>> >>are
>> >> >>>>>>>not listening of course.
>> >> >>>>>>>
>> >> >>>>>>>Now's a good time to resurrect this old thread :)
>> >> >>>>>>>http://markmail.org/thread/hq2rd5lobbl4nkav
>> >> >>>>>>>I like Patrick Mueller's suggestion in that thread - but we
>>are
>> >> >>>>>>>migrating to config.xml (no ETA) so...
>> >> >>>>>>>
>> >> >>>>>>>On Fri, Oct 19, 2012 at 11:24 AM, Brian LeRoux <b...@brian.io>
>> >>wrote:
>> >> >>>>>>>> Regarding:
>> >> >>>>>>>>
>> >> >>>>>>>>
>> >> >>>>>>>>
>> >>
>> >>
>> 
>>https://github.com/alunny/cordova-plugin-spec/issues/5#issuecomment-95827
>> >> >>>>>>>>05
>> >> >>>>>>>>
>> >> >>>>>>>> Looks like we do not have a lifecycle event for app
>> >>launch/create
>> >> in
>> >> >>>>>>>>iOS land:
>> >> >>>>>>>>
>> >> >>>>>>>>
>> >> >>>>>>>>
>> >>
>> >>
>> 
>>https://github.com/apache/incubator-cordova-ios/blob/master/CordovaLib/Cl
>> >> >>>>>>>>asses/CDVPlugin.h
>> >> >>>>>>>>
>> >> >>>>>>>> Any objections/concerns for having something like the
>>Android
>> >> plugin
>> >> >>>>>>>> init method?
>> >> >>>>>>>>
>> >> >>>>>>>>
>> >> >>>>>>>>
>> >>
>> >>
>> 
>>https://github.com/apache/incubator-cordova-android/blob/master/framework
>> >> >>>>>>>>/src/org/apache/cordova/api/CordovaPlugin.java#L39
>> >> >>>>>>
>> >>
>> >
>> >
>> >
>> >--
>> > [image: Wizcorp - Incorporated Wizards!]
>> > Ally Ogilvie
>> >Lead Developer for Mobile Devices
>> >
>> >
>> >
>> >   wizcorp.jp
>> >
>> >3-10-14-6F, Higashi Nihombashi, Chuo-ku, 103-0004, Tokyo
>> >Tel: (+81)3-4550-1448 - E-mail: aogilvie@wizcorp.jp
>>
>>
>
>
>-- 
> [image: Wizcorp - Incorporated Wizards!]
> Ally Ogilvie
>Lead Developer for Mobile Devices
>
>
>
>   wizcorp.jp
>
>3-10-14-6F, Higashi Nihombashi, Chuo-ku, 103-0004, Tokyo
>Tel: (+81)3-4550-1448 - E-mail: aogilvie@wizcorp.jp


Re: enhancing the plugin lifecycle for ios

Posted by Ally Ogilvie <ao...@wizcorp.jp>.
Is there a point to having / making a plugin that is ready to use before
deviceready() ...
BUT not actually possible to comunicate with until deviceready() ?
:)



On Mon, Oct 22, 2012 at 12:49 PM, Filip Maj <fi...@adobe.com> wrote:

> One example: plugins that need to be eagerly-loaded could be required
> before deviceready fires, so attaching to deviceready might not be an
> option :)
>
> On 10/21/12 6:40 PM, "Ally Ogilvie" <ao...@wizcorp.jp> wrote:
>
> >+1 lazy load.
> >Start up times can be critical to some apps.
> >Booting a plugin from device ready() in JS or init /
> >applicationDidFinishLaunchBlah in iOS is not enough for someone?
> >
> >
> >On Sat, Oct 20, 2012 at 7:14 AM, Brian LeRoux <b...@brian.io> wrote:
> >
> >> Koolaide, I added a subtask.
> >>
> >> On Fri, Oct 19, 2012 at 3:02 PM, Shazron <sh...@gmail.com> wrote:
> >> > We  have https://issues.apache.org/jira/browse/CB-1108 for 2.3.0
> >> >
> >> > On Fri, Oct 19, 2012 at 1:39 PM, Brian LeRoux <b...@brian.io> wrote:
> >> >> Thats cool. Is the config.xml thing in jira? (Maybe add as subtask if
> >> so?)
> >> >>
> >> >> On Fri, Oct 19, 2012 at 12:48 PM, Shazron <sh...@gmail.com> wrote:
> >> >>> Dave - no we did not. We discussed it in the markmail thread I
> >>linked
> >> >>> to, but never did implement it.
> >> >>>
> >> >>> On Fri, Oct 19, 2012 at 12:41 PM, Dave Johnson <
> >> dave.c.johnson@gmail.com> wrote:
> >> >>>> Hey Shaz I thought that that we did the same thing with iOS as the
> >> >>>> onload thing in Java land?
> >> >>>>
> >> >>>> -d
> >> >>>>
> >> >>>> On Fri, Oct 19, 2012 at 12:02 PM, Shazron <sh...@gmail.com>
> >>wrote:
> >> >>>>> We can do the same for iOS once we move to config.xml. Should we
> >> wait till then?
> >> >>>>>
> >> >>>>> On Fri, Oct 19, 2012 at 11:58 AM, Filip Maj <fi...@adobe.com>
> wrote:
> >> >>>>>> Plugin Manager in java land loads plugins defined with the
> >>'onload'
> >> >>>>>> attribute right away, otherwise lazy loads them.
> >> >>>>>>
> >> >>>>>>
> >>
> >>
> https://github.com/apache/incubator-cordova-android/blob/master/framework
> >>/s
> >> >>>>>> rc/org/apache/cordova/api/PluginManager.java#L189
> >> >>>>>>
> >> >>>>>>
> >> >>>>>> On 10/19/12 11:54 AM, "Shazron" <sh...@gmail.com> wrote:
> >> >>>>>>
> >> >>>>>>>This is possible if somehow we can set which plugins can be
> >>"loaded"
> >> >>>>>>>at startup (or should all of them be loaded? seems wasteful).
> >>Right
> >> >>>>>>>now they are lazily loaded (on first use), so sending them a
> >> >>>>>>>"onAppLaunch" event (or equivalent) would do nothing since they
> >>are
> >> >>>>>>>not listening of course.
> >> >>>>>>>
> >> >>>>>>>Now's a good time to resurrect this old thread :)
> >> >>>>>>>http://markmail.org/thread/hq2rd5lobbl4nkav
> >> >>>>>>>I like Patrick Mueller's suggestion in that thread - but we are
> >> >>>>>>>migrating to config.xml (no ETA) so...
> >> >>>>>>>
> >> >>>>>>>On Fri, Oct 19, 2012 at 11:24 AM, Brian LeRoux <b...@brian.io>
> >>wrote:
> >> >>>>>>>> Regarding:
> >> >>>>>>>>
> >> >>>>>>>>
> >> >>>>>>>>
> >>
> >>
> https://github.com/alunny/cordova-plugin-spec/issues/5#issuecomment-95827
> >> >>>>>>>>05
> >> >>>>>>>>
> >> >>>>>>>> Looks like we do not have a lifecycle event for app
> >>launch/create
> >> in
> >> >>>>>>>>iOS land:
> >> >>>>>>>>
> >> >>>>>>>>
> >> >>>>>>>>
> >>
> >>
> https://github.com/apache/incubator-cordova-ios/blob/master/CordovaLib/Cl
> >> >>>>>>>>asses/CDVPlugin.h
> >> >>>>>>>>
> >> >>>>>>>> Any objections/concerns for having something like the Android
> >> plugin
> >> >>>>>>>> init method?
> >> >>>>>>>>
> >> >>>>>>>>
> >> >>>>>>>>
> >>
> >>
> https://github.com/apache/incubator-cordova-android/blob/master/framework
> >> >>>>>>>>/src/org/apache/cordova/api/CordovaPlugin.java#L39
> >> >>>>>>
> >>
> >
> >
> >
> >--
> > [image: Wizcorp - Incorporated Wizards!]
> > Ally Ogilvie
> >Lead Developer for Mobile Devices
> >
> >
> >
> >   wizcorp.jp
> >
> >3-10-14-6F, Higashi Nihombashi, Chuo-ku, 103-0004, Tokyo
> >Tel: (+81)3-4550-1448 - E-mail: aogilvie@wizcorp.jp
>
>


-- 
 [image: Wizcorp - Incorporated Wizards!]
 Ally Ogilvie
Lead Developer for Mobile Devices



   wizcorp.jp

3-10-14-6F, Higashi Nihombashi, Chuo-ku, 103-0004, Tokyo
Tel: (+81)3-4550-1448 - E-mail: aogilvie@wizcorp.jp

Re: enhancing the plugin lifecycle for ios

Posted by Shazron <sh...@gmail.com>.
It is not the matter of it being enough -- we want this so the plugin
"init" code can be outside of applicationDidFInishLaunching, and
handled by the plugin itself. Think of upgrades for plugins.

I agree that startup time can be critical -- on iOS at least we can
async load the plugins, although I would say in that case the
"deviceready" event is not entirely true, not all the plugins are
ready yet. We could leave the onus on to the dev in choosing plugins
that don't hog startup time, and also have a "watchdog" loader that
could kill loading any plugins that take up too much time.

On Sun, Oct 21, 2012 at 6:40 PM, Ally Ogilvie <ao...@wizcorp.jp> wrote:
> +1 lazy load.
> Start up times can be critical to some apps.
> Booting a plugin from device ready() in JS or init /
> applicationDidFinishLaunchBlah in iOS is not enough for someone?
>
>
> On Sat, Oct 20, 2012 at 7:14 AM, Brian LeRoux <b...@brian.io> wrote:
>
>> Koolaide, I added a subtask.
>>
>> On Fri, Oct 19, 2012 at 3:02 PM, Shazron <sh...@gmail.com> wrote:
>> > We  have https://issues.apache.org/jira/browse/CB-1108 for 2.3.0
>> >
>> > On Fri, Oct 19, 2012 at 1:39 PM, Brian LeRoux <b...@brian.io> wrote:
>> >> Thats cool. Is the config.xml thing in jira? (Maybe add as subtask if
>> so?)
>> >>
>> >> On Fri, Oct 19, 2012 at 12:48 PM, Shazron <sh...@gmail.com> wrote:
>> >>> Dave - no we did not. We discussed it in the markmail thread I linked
>> >>> to, but never did implement it.
>> >>>
>> >>> On Fri, Oct 19, 2012 at 12:41 PM, Dave Johnson <
>> dave.c.johnson@gmail.com> wrote:
>> >>>> Hey Shaz I thought that that we did the same thing with iOS as the
>> >>>> onload thing in Java land?
>> >>>>
>> >>>> -d
>> >>>>
>> >>>> On Fri, Oct 19, 2012 at 12:02 PM, Shazron <sh...@gmail.com> wrote:
>> >>>>> We can do the same for iOS once we move to config.xml. Should we
>> wait till then?
>> >>>>>
>> >>>>> On Fri, Oct 19, 2012 at 11:58 AM, Filip Maj <fi...@adobe.com> wrote:
>> >>>>>> Plugin Manager in java land loads plugins defined with the 'onload'
>> >>>>>> attribute right away, otherwise lazy loads them.
>> >>>>>>
>> >>>>>>
>> https://github.com/apache/incubator-cordova-android/blob/master/framework/s
>> >>>>>> rc/org/apache/cordova/api/PluginManager.java#L189
>> >>>>>>
>> >>>>>>
>> >>>>>> On 10/19/12 11:54 AM, "Shazron" <sh...@gmail.com> wrote:
>> >>>>>>
>> >>>>>>>This is possible if somehow we can set which plugins can be "loaded"
>> >>>>>>>at startup (or should all of them be loaded? seems wasteful). Right
>> >>>>>>>now they are lazily loaded (on first use), so sending them a
>> >>>>>>>"onAppLaunch" event (or equivalent) would do nothing since they are
>> >>>>>>>not listening of course.
>> >>>>>>>
>> >>>>>>>Now's a good time to resurrect this old thread :)
>> >>>>>>>http://markmail.org/thread/hq2rd5lobbl4nkav
>> >>>>>>>I like Patrick Mueller's suggestion in that thread - but we are
>> >>>>>>>migrating to config.xml (no ETA) so...
>> >>>>>>>
>> >>>>>>>On Fri, Oct 19, 2012 at 11:24 AM, Brian LeRoux <b...@brian.io> wrote:
>> >>>>>>>> Regarding:
>> >>>>>>>>
>> >>>>>>>>
>> >>>>>>>>
>> https://github.com/alunny/cordova-plugin-spec/issues/5#issuecomment-95827
>> >>>>>>>>05
>> >>>>>>>>
>> >>>>>>>> Looks like we do not have a lifecycle event for app launch/create
>> in
>> >>>>>>>>iOS land:
>> >>>>>>>>
>> >>>>>>>>
>> >>>>>>>>
>> https://github.com/apache/incubator-cordova-ios/blob/master/CordovaLib/Cl
>> >>>>>>>>asses/CDVPlugin.h
>> >>>>>>>>
>> >>>>>>>> Any objections/concerns for having something like the Android
>> plugin
>> >>>>>>>> init method?
>> >>>>>>>>
>> >>>>>>>>
>> >>>>>>>>
>> https://github.com/apache/incubator-cordova-android/blob/master/framework
>> >>>>>>>>/src/org/apache/cordova/api/CordovaPlugin.java#L39
>> >>>>>>
>>
>
>
>
> --
>  [image: Wizcorp - Incorporated Wizards!]
>  Ally Ogilvie
> Lead Developer for Mobile Devices
>
>
>
>    wizcorp.jp
>
> 3-10-14-6F, Higashi Nihombashi, Chuo-ku, 103-0004, Tokyo
> Tel: (+81)3-4550-1448 - E-mail: aogilvie@wizcorp.jp

Re: enhancing the plugin lifecycle for ios

Posted by Filip Maj <fi...@adobe.com>.
One example: plugins that need to be eagerly-loaded could be required
before deviceready fires, so attaching to deviceready might not be an
option :)

On 10/21/12 6:40 PM, "Ally Ogilvie" <ao...@wizcorp.jp> wrote:

>+1 lazy load.
>Start up times can be critical to some apps.
>Booting a plugin from device ready() in JS or init /
>applicationDidFinishLaunchBlah in iOS is not enough for someone?
>
>
>On Sat, Oct 20, 2012 at 7:14 AM, Brian LeRoux <b...@brian.io> wrote:
>
>> Koolaide, I added a subtask.
>>
>> On Fri, Oct 19, 2012 at 3:02 PM, Shazron <sh...@gmail.com> wrote:
>> > We  have https://issues.apache.org/jira/browse/CB-1108 for 2.3.0
>> >
>> > On Fri, Oct 19, 2012 at 1:39 PM, Brian LeRoux <b...@brian.io> wrote:
>> >> Thats cool. Is the config.xml thing in jira? (Maybe add as subtask if
>> so?)
>> >>
>> >> On Fri, Oct 19, 2012 at 12:48 PM, Shazron <sh...@gmail.com> wrote:
>> >>> Dave - no we did not. We discussed it in the markmail thread I
>>linked
>> >>> to, but never did implement it.
>> >>>
>> >>> On Fri, Oct 19, 2012 at 12:41 PM, Dave Johnson <
>> dave.c.johnson@gmail.com> wrote:
>> >>>> Hey Shaz I thought that that we did the same thing with iOS as the
>> >>>> onload thing in Java land?
>> >>>>
>> >>>> -d
>> >>>>
>> >>>> On Fri, Oct 19, 2012 at 12:02 PM, Shazron <sh...@gmail.com>
>>wrote:
>> >>>>> We can do the same for iOS once we move to config.xml. Should we
>> wait till then?
>> >>>>>
>> >>>>> On Fri, Oct 19, 2012 at 11:58 AM, Filip Maj <fi...@adobe.com> wrote:
>> >>>>>> Plugin Manager in java land loads plugins defined with the
>>'onload'
>> >>>>>> attribute right away, otherwise lazy loads them.
>> >>>>>>
>> >>>>>>
>> 
>>https://github.com/apache/incubator-cordova-android/blob/master/framework
>>/s
>> >>>>>> rc/org/apache/cordova/api/PluginManager.java#L189
>> >>>>>>
>> >>>>>>
>> >>>>>> On 10/19/12 11:54 AM, "Shazron" <sh...@gmail.com> wrote:
>> >>>>>>
>> >>>>>>>This is possible if somehow we can set which plugins can be
>>"loaded"
>> >>>>>>>at startup (or should all of them be loaded? seems wasteful).
>>Right
>> >>>>>>>now they are lazily loaded (on first use), so sending them a
>> >>>>>>>"onAppLaunch" event (or equivalent) would do nothing since they
>>are
>> >>>>>>>not listening of course.
>> >>>>>>>
>> >>>>>>>Now's a good time to resurrect this old thread :)
>> >>>>>>>http://markmail.org/thread/hq2rd5lobbl4nkav
>> >>>>>>>I like Patrick Mueller's suggestion in that thread - but we are
>> >>>>>>>migrating to config.xml (no ETA) so...
>> >>>>>>>
>> >>>>>>>On Fri, Oct 19, 2012 at 11:24 AM, Brian LeRoux <b...@brian.io>
>>wrote:
>> >>>>>>>> Regarding:
>> >>>>>>>>
>> >>>>>>>>
>> >>>>>>>>
>> 
>>https://github.com/alunny/cordova-plugin-spec/issues/5#issuecomment-95827
>> >>>>>>>>05
>> >>>>>>>>
>> >>>>>>>> Looks like we do not have a lifecycle event for app
>>launch/create
>> in
>> >>>>>>>>iOS land:
>> >>>>>>>>
>> >>>>>>>>
>> >>>>>>>>
>> 
>>https://github.com/apache/incubator-cordova-ios/blob/master/CordovaLib/Cl
>> >>>>>>>>asses/CDVPlugin.h
>> >>>>>>>>
>> >>>>>>>> Any objections/concerns for having something like the Android
>> plugin
>> >>>>>>>> init method?
>> >>>>>>>>
>> >>>>>>>>
>> >>>>>>>>
>> 
>>https://github.com/apache/incubator-cordova-android/blob/master/framework
>> >>>>>>>>/src/org/apache/cordova/api/CordovaPlugin.java#L39
>> >>>>>>
>>
>
>
>
>-- 
> [image: Wizcorp - Incorporated Wizards!]
> Ally Ogilvie
>Lead Developer for Mobile Devices
>
>
>
>   wizcorp.jp
>
>3-10-14-6F, Higashi Nihombashi, Chuo-ku, 103-0004, Tokyo
>Tel: (+81)3-4550-1448 - E-mail: aogilvie@wizcorp.jp


Re: enhancing the plugin lifecycle for ios

Posted by Ally Ogilvie <ao...@wizcorp.jp>.
+1 lazy load.
Start up times can be critical to some apps.
Booting a plugin from device ready() in JS or init /
applicationDidFinishLaunchBlah in iOS is not enough for someone?


On Sat, Oct 20, 2012 at 7:14 AM, Brian LeRoux <b...@brian.io> wrote:

> Koolaide, I added a subtask.
>
> On Fri, Oct 19, 2012 at 3:02 PM, Shazron <sh...@gmail.com> wrote:
> > We  have https://issues.apache.org/jira/browse/CB-1108 for 2.3.0
> >
> > On Fri, Oct 19, 2012 at 1:39 PM, Brian LeRoux <b...@brian.io> wrote:
> >> Thats cool. Is the config.xml thing in jira? (Maybe add as subtask if
> so?)
> >>
> >> On Fri, Oct 19, 2012 at 12:48 PM, Shazron <sh...@gmail.com> wrote:
> >>> Dave - no we did not. We discussed it in the markmail thread I linked
> >>> to, but never did implement it.
> >>>
> >>> On Fri, Oct 19, 2012 at 12:41 PM, Dave Johnson <
> dave.c.johnson@gmail.com> wrote:
> >>>> Hey Shaz I thought that that we did the same thing with iOS as the
> >>>> onload thing in Java land?
> >>>>
> >>>> -d
> >>>>
> >>>> On Fri, Oct 19, 2012 at 12:02 PM, Shazron <sh...@gmail.com> wrote:
> >>>>> We can do the same for iOS once we move to config.xml. Should we
> wait till then?
> >>>>>
> >>>>> On Fri, Oct 19, 2012 at 11:58 AM, Filip Maj <fi...@adobe.com> wrote:
> >>>>>> Plugin Manager in java land loads plugins defined with the 'onload'
> >>>>>> attribute right away, otherwise lazy loads them.
> >>>>>>
> >>>>>>
> https://github.com/apache/incubator-cordova-android/blob/master/framework/s
> >>>>>> rc/org/apache/cordova/api/PluginManager.java#L189
> >>>>>>
> >>>>>>
> >>>>>> On 10/19/12 11:54 AM, "Shazron" <sh...@gmail.com> wrote:
> >>>>>>
> >>>>>>>This is possible if somehow we can set which plugins can be "loaded"
> >>>>>>>at startup (or should all of them be loaded? seems wasteful). Right
> >>>>>>>now they are lazily loaded (on first use), so sending them a
> >>>>>>>"onAppLaunch" event (or equivalent) would do nothing since they are
> >>>>>>>not listening of course.
> >>>>>>>
> >>>>>>>Now's a good time to resurrect this old thread :)
> >>>>>>>http://markmail.org/thread/hq2rd5lobbl4nkav
> >>>>>>>I like Patrick Mueller's suggestion in that thread - but we are
> >>>>>>>migrating to config.xml (no ETA) so...
> >>>>>>>
> >>>>>>>On Fri, Oct 19, 2012 at 11:24 AM, Brian LeRoux <b...@brian.io> wrote:
> >>>>>>>> Regarding:
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> https://github.com/alunny/cordova-plugin-spec/issues/5#issuecomment-95827
> >>>>>>>>05
> >>>>>>>>
> >>>>>>>> Looks like we do not have a lifecycle event for app launch/create
> in
> >>>>>>>>iOS land:
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> https://github.com/apache/incubator-cordova-ios/blob/master/CordovaLib/Cl
> >>>>>>>>asses/CDVPlugin.h
> >>>>>>>>
> >>>>>>>> Any objections/concerns for having something like the Android
> plugin
> >>>>>>>> init method?
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> https://github.com/apache/incubator-cordova-android/blob/master/framework
> >>>>>>>>/src/org/apache/cordova/api/CordovaPlugin.java#L39
> >>>>>>
>



-- 
 [image: Wizcorp - Incorporated Wizards!]
 Ally Ogilvie
Lead Developer for Mobile Devices



   wizcorp.jp

3-10-14-6F, Higashi Nihombashi, Chuo-ku, 103-0004, Tokyo
Tel: (+81)3-4550-1448 - E-mail: aogilvie@wizcorp.jp

Re: enhancing the plugin lifecycle for ios

Posted by Brian LeRoux <b...@brian.io>.
Koolaide, I added a subtask.

On Fri, Oct 19, 2012 at 3:02 PM, Shazron <sh...@gmail.com> wrote:
> We  have https://issues.apache.org/jira/browse/CB-1108 for 2.3.0
>
> On Fri, Oct 19, 2012 at 1:39 PM, Brian LeRoux <b...@brian.io> wrote:
>> Thats cool. Is the config.xml thing in jira? (Maybe add as subtask if so?)
>>
>> On Fri, Oct 19, 2012 at 12:48 PM, Shazron <sh...@gmail.com> wrote:
>>> Dave - no we did not. We discussed it in the markmail thread I linked
>>> to, but never did implement it.
>>>
>>> On Fri, Oct 19, 2012 at 12:41 PM, Dave Johnson <da...@gmail.com> wrote:
>>>> Hey Shaz I thought that that we did the same thing with iOS as the
>>>> onload thing in Java land?
>>>>
>>>> -d
>>>>
>>>> On Fri, Oct 19, 2012 at 12:02 PM, Shazron <sh...@gmail.com> wrote:
>>>>> We can do the same for iOS once we move to config.xml. Should we wait till then?
>>>>>
>>>>> On Fri, Oct 19, 2012 at 11:58 AM, Filip Maj <fi...@adobe.com> wrote:
>>>>>> Plugin Manager in java land loads plugins defined with the 'onload'
>>>>>> attribute right away, otherwise lazy loads them.
>>>>>>
>>>>>> https://github.com/apache/incubator-cordova-android/blob/master/framework/s
>>>>>> rc/org/apache/cordova/api/PluginManager.java#L189
>>>>>>
>>>>>>
>>>>>> On 10/19/12 11:54 AM, "Shazron" <sh...@gmail.com> wrote:
>>>>>>
>>>>>>>This is possible if somehow we can set which plugins can be "loaded"
>>>>>>>at startup (or should all of them be loaded? seems wasteful). Right
>>>>>>>now they are lazily loaded (on first use), so sending them a
>>>>>>>"onAppLaunch" event (or equivalent) would do nothing since they are
>>>>>>>not listening of course.
>>>>>>>
>>>>>>>Now's a good time to resurrect this old thread :)
>>>>>>>http://markmail.org/thread/hq2rd5lobbl4nkav
>>>>>>>I like Patrick Mueller's suggestion in that thread - but we are
>>>>>>>migrating to config.xml (no ETA) so...
>>>>>>>
>>>>>>>On Fri, Oct 19, 2012 at 11:24 AM, Brian LeRoux <b...@brian.io> wrote:
>>>>>>>> Regarding:
>>>>>>>>
>>>>>>>>
>>>>>>>>https://github.com/alunny/cordova-plugin-spec/issues/5#issuecomment-95827
>>>>>>>>05
>>>>>>>>
>>>>>>>> Looks like we do not have a lifecycle event for app launch/create in
>>>>>>>>iOS land:
>>>>>>>>
>>>>>>>>
>>>>>>>>https://github.com/apache/incubator-cordova-ios/blob/master/CordovaLib/Cl
>>>>>>>>asses/CDVPlugin.h
>>>>>>>>
>>>>>>>> Any objections/concerns for having something like the Android plugin
>>>>>>>> init method?
>>>>>>>>
>>>>>>>>
>>>>>>>>https://github.com/apache/incubator-cordova-android/blob/master/framework
>>>>>>>>/src/org/apache/cordova/api/CordovaPlugin.java#L39
>>>>>>

Re: enhancing the plugin lifecycle for ios

Posted by Shazron <sh...@gmail.com>.
We  have https://issues.apache.org/jira/browse/CB-1108 for 2.3.0

On Fri, Oct 19, 2012 at 1:39 PM, Brian LeRoux <b...@brian.io> wrote:
> Thats cool. Is the config.xml thing in jira? (Maybe add as subtask if so?)
>
> On Fri, Oct 19, 2012 at 12:48 PM, Shazron <sh...@gmail.com> wrote:
>> Dave - no we did not. We discussed it in the markmail thread I linked
>> to, but never did implement it.
>>
>> On Fri, Oct 19, 2012 at 12:41 PM, Dave Johnson <da...@gmail.com> wrote:
>>> Hey Shaz I thought that that we did the same thing with iOS as the
>>> onload thing in Java land?
>>>
>>> -d
>>>
>>> On Fri, Oct 19, 2012 at 12:02 PM, Shazron <sh...@gmail.com> wrote:
>>>> We can do the same for iOS once we move to config.xml. Should we wait till then?
>>>>
>>>> On Fri, Oct 19, 2012 at 11:58 AM, Filip Maj <fi...@adobe.com> wrote:
>>>>> Plugin Manager in java land loads plugins defined with the 'onload'
>>>>> attribute right away, otherwise lazy loads them.
>>>>>
>>>>> https://github.com/apache/incubator-cordova-android/blob/master/framework/s
>>>>> rc/org/apache/cordova/api/PluginManager.java#L189
>>>>>
>>>>>
>>>>> On 10/19/12 11:54 AM, "Shazron" <sh...@gmail.com> wrote:
>>>>>
>>>>>>This is possible if somehow we can set which plugins can be "loaded"
>>>>>>at startup (or should all of them be loaded? seems wasteful). Right
>>>>>>now they are lazily loaded (on first use), so sending them a
>>>>>>"onAppLaunch" event (or equivalent) would do nothing since they are
>>>>>>not listening of course.
>>>>>>
>>>>>>Now's a good time to resurrect this old thread :)
>>>>>>http://markmail.org/thread/hq2rd5lobbl4nkav
>>>>>>I like Patrick Mueller's suggestion in that thread - but we are
>>>>>>migrating to config.xml (no ETA) so...
>>>>>>
>>>>>>On Fri, Oct 19, 2012 at 11:24 AM, Brian LeRoux <b...@brian.io> wrote:
>>>>>>> Regarding:
>>>>>>>
>>>>>>>
>>>>>>>https://github.com/alunny/cordova-plugin-spec/issues/5#issuecomment-95827
>>>>>>>05
>>>>>>>
>>>>>>> Looks like we do not have a lifecycle event for app launch/create in
>>>>>>>iOS land:
>>>>>>>
>>>>>>>
>>>>>>>https://github.com/apache/incubator-cordova-ios/blob/master/CordovaLib/Cl
>>>>>>>asses/CDVPlugin.h
>>>>>>>
>>>>>>> Any objections/concerns for having something like the Android plugin
>>>>>>> init method?
>>>>>>>
>>>>>>>
>>>>>>>https://github.com/apache/incubator-cordova-android/blob/master/framework
>>>>>>>/src/org/apache/cordova/api/CordovaPlugin.java#L39
>>>>>

Re: enhancing the plugin lifecycle for ios

Posted by Brian LeRoux <b...@brian.io>.
Thats cool. Is the config.xml thing in jira? (Maybe add as subtask if so?)

On Fri, Oct 19, 2012 at 12:48 PM, Shazron <sh...@gmail.com> wrote:
> Dave - no we did not. We discussed it in the markmail thread I linked
> to, but never did implement it.
>
> On Fri, Oct 19, 2012 at 12:41 PM, Dave Johnson <da...@gmail.com> wrote:
>> Hey Shaz I thought that that we did the same thing with iOS as the
>> onload thing in Java land?
>>
>> -d
>>
>> On Fri, Oct 19, 2012 at 12:02 PM, Shazron <sh...@gmail.com> wrote:
>>> We can do the same for iOS once we move to config.xml. Should we wait till then?
>>>
>>> On Fri, Oct 19, 2012 at 11:58 AM, Filip Maj <fi...@adobe.com> wrote:
>>>> Plugin Manager in java land loads plugins defined with the 'onload'
>>>> attribute right away, otherwise lazy loads them.
>>>>
>>>> https://github.com/apache/incubator-cordova-android/blob/master/framework/s
>>>> rc/org/apache/cordova/api/PluginManager.java#L189
>>>>
>>>>
>>>> On 10/19/12 11:54 AM, "Shazron" <sh...@gmail.com> wrote:
>>>>
>>>>>This is possible if somehow we can set which plugins can be "loaded"
>>>>>at startup (or should all of them be loaded? seems wasteful). Right
>>>>>now they are lazily loaded (on first use), so sending them a
>>>>>"onAppLaunch" event (or equivalent) would do nothing since they are
>>>>>not listening of course.
>>>>>
>>>>>Now's a good time to resurrect this old thread :)
>>>>>http://markmail.org/thread/hq2rd5lobbl4nkav
>>>>>I like Patrick Mueller's suggestion in that thread - but we are
>>>>>migrating to config.xml (no ETA) so...
>>>>>
>>>>>On Fri, Oct 19, 2012 at 11:24 AM, Brian LeRoux <b...@brian.io> wrote:
>>>>>> Regarding:
>>>>>>
>>>>>>
>>>>>>https://github.com/alunny/cordova-plugin-spec/issues/5#issuecomment-95827
>>>>>>05
>>>>>>
>>>>>> Looks like we do not have a lifecycle event for app launch/create in
>>>>>>iOS land:
>>>>>>
>>>>>>
>>>>>>https://github.com/apache/incubator-cordova-ios/blob/master/CordovaLib/Cl
>>>>>>asses/CDVPlugin.h
>>>>>>
>>>>>> Any objections/concerns for having something like the Android plugin
>>>>>> init method?
>>>>>>
>>>>>>
>>>>>>https://github.com/apache/incubator-cordova-android/blob/master/framework
>>>>>>/src/org/apache/cordova/api/CordovaPlugin.java#L39
>>>>

Re: enhancing the plugin lifecycle for ios

Posted by Shazron <sh...@gmail.com>.
Dave - no we did not. We discussed it in the markmail thread I linked
to, but never did implement it.

On Fri, Oct 19, 2012 at 12:41 PM, Dave Johnson <da...@gmail.com> wrote:
> Hey Shaz I thought that that we did the same thing with iOS as the
> onload thing in Java land?
>
> -d
>
> On Fri, Oct 19, 2012 at 12:02 PM, Shazron <sh...@gmail.com> wrote:
>> We can do the same for iOS once we move to config.xml. Should we wait till then?
>>
>> On Fri, Oct 19, 2012 at 11:58 AM, Filip Maj <fi...@adobe.com> wrote:
>>> Plugin Manager in java land loads plugins defined with the 'onload'
>>> attribute right away, otherwise lazy loads them.
>>>
>>> https://github.com/apache/incubator-cordova-android/blob/master/framework/s
>>> rc/org/apache/cordova/api/PluginManager.java#L189
>>>
>>>
>>> On 10/19/12 11:54 AM, "Shazron" <sh...@gmail.com> wrote:
>>>
>>>>This is possible if somehow we can set which plugins can be "loaded"
>>>>at startup (or should all of them be loaded? seems wasteful). Right
>>>>now they are lazily loaded (on first use), so sending them a
>>>>"onAppLaunch" event (or equivalent) would do nothing since they are
>>>>not listening of course.
>>>>
>>>>Now's a good time to resurrect this old thread :)
>>>>http://markmail.org/thread/hq2rd5lobbl4nkav
>>>>I like Patrick Mueller's suggestion in that thread - but we are
>>>>migrating to config.xml (no ETA) so...
>>>>
>>>>On Fri, Oct 19, 2012 at 11:24 AM, Brian LeRoux <b...@brian.io> wrote:
>>>>> Regarding:
>>>>>
>>>>>
>>>>>https://github.com/alunny/cordova-plugin-spec/issues/5#issuecomment-95827
>>>>>05
>>>>>
>>>>> Looks like we do not have a lifecycle event for app launch/create in
>>>>>iOS land:
>>>>>
>>>>>
>>>>>https://github.com/apache/incubator-cordova-ios/blob/master/CordovaLib/Cl
>>>>>asses/CDVPlugin.h
>>>>>
>>>>> Any objections/concerns for having something like the Android plugin
>>>>> init method?
>>>>>
>>>>>
>>>>>https://github.com/apache/incubator-cordova-android/blob/master/framework
>>>>>/src/org/apache/cordova/api/CordovaPlugin.java#L39
>>>

Re: enhancing the plugin lifecycle for ios

Posted by Dave Johnson <da...@gmail.com>.
Hey Shaz I thought that that we did the same thing with iOS as the
onload thing in Java land?

-d

On Fri, Oct 19, 2012 at 12:02 PM, Shazron <sh...@gmail.com> wrote:
> We can do the same for iOS once we move to config.xml. Should we wait till then?
>
> On Fri, Oct 19, 2012 at 11:58 AM, Filip Maj <fi...@adobe.com> wrote:
>> Plugin Manager in java land loads plugins defined with the 'onload'
>> attribute right away, otherwise lazy loads them.
>>
>> https://github.com/apache/incubator-cordova-android/blob/master/framework/s
>> rc/org/apache/cordova/api/PluginManager.java#L189
>>
>>
>> On 10/19/12 11:54 AM, "Shazron" <sh...@gmail.com> wrote:
>>
>>>This is possible if somehow we can set which plugins can be "loaded"
>>>at startup (or should all of them be loaded? seems wasteful). Right
>>>now they are lazily loaded (on first use), so sending them a
>>>"onAppLaunch" event (or equivalent) would do nothing since they are
>>>not listening of course.
>>>
>>>Now's a good time to resurrect this old thread :)
>>>http://markmail.org/thread/hq2rd5lobbl4nkav
>>>I like Patrick Mueller's suggestion in that thread - but we are
>>>migrating to config.xml (no ETA) so...
>>>
>>>On Fri, Oct 19, 2012 at 11:24 AM, Brian LeRoux <b...@brian.io> wrote:
>>>> Regarding:
>>>>
>>>>
>>>>https://github.com/alunny/cordova-plugin-spec/issues/5#issuecomment-95827
>>>>05
>>>>
>>>> Looks like we do not have a lifecycle event for app launch/create in
>>>>iOS land:
>>>>
>>>>
>>>>https://github.com/apache/incubator-cordova-ios/blob/master/CordovaLib/Cl
>>>>asses/CDVPlugin.h
>>>>
>>>> Any objections/concerns for having something like the Android plugin
>>>> init method?
>>>>
>>>>
>>>>https://github.com/apache/incubator-cordova-android/blob/master/framework
>>>>/src/org/apache/cordova/api/CordovaPlugin.java#L39
>>

Re: enhancing the plugin lifecycle for ios

Posted by Shazron <sh...@gmail.com>.
We can do the same for iOS once we move to config.xml. Should we wait till then?

On Fri, Oct 19, 2012 at 11:58 AM, Filip Maj <fi...@adobe.com> wrote:
> Plugin Manager in java land loads plugins defined with the 'onload'
> attribute right away, otherwise lazy loads them.
>
> https://github.com/apache/incubator-cordova-android/blob/master/framework/s
> rc/org/apache/cordova/api/PluginManager.java#L189
>
>
> On 10/19/12 11:54 AM, "Shazron" <sh...@gmail.com> wrote:
>
>>This is possible if somehow we can set which plugins can be "loaded"
>>at startup (or should all of them be loaded? seems wasteful). Right
>>now they are lazily loaded (on first use), so sending them a
>>"onAppLaunch" event (or equivalent) would do nothing since they are
>>not listening of course.
>>
>>Now's a good time to resurrect this old thread :)
>>http://markmail.org/thread/hq2rd5lobbl4nkav
>>I like Patrick Mueller's suggestion in that thread - but we are
>>migrating to config.xml (no ETA) so...
>>
>>On Fri, Oct 19, 2012 at 11:24 AM, Brian LeRoux <b...@brian.io> wrote:
>>> Regarding:
>>>
>>>
>>>https://github.com/alunny/cordova-plugin-spec/issues/5#issuecomment-95827
>>>05
>>>
>>> Looks like we do not have a lifecycle event for app launch/create in
>>>iOS land:
>>>
>>>
>>>https://github.com/apache/incubator-cordova-ios/blob/master/CordovaLib/Cl
>>>asses/CDVPlugin.h
>>>
>>> Any objections/concerns for having something like the Android plugin
>>> init method?
>>>
>>>
>>>https://github.com/apache/incubator-cordova-android/blob/master/framework
>>>/src/org/apache/cordova/api/CordovaPlugin.java#L39
>

Re: enhancing the plugin lifecycle for ios

Posted by Filip Maj <fi...@adobe.com>.
Plugin Manager in java land loads plugins defined with the 'onload'
attribute right away, otherwise lazy loads them.

https://github.com/apache/incubator-cordova-android/blob/master/framework/s
rc/org/apache/cordova/api/PluginManager.java#L189


On 10/19/12 11:54 AM, "Shazron" <sh...@gmail.com> wrote:

>This is possible if somehow we can set which plugins can be "loaded"
>at startup (or should all of them be loaded? seems wasteful). Right
>now they are lazily loaded (on first use), so sending them a
>"onAppLaunch" event (or equivalent) would do nothing since they are
>not listening of course.
>
>Now's a good time to resurrect this old thread :)
>http://markmail.org/thread/hq2rd5lobbl4nkav
>I like Patrick Mueller's suggestion in that thread - but we are
>migrating to config.xml (no ETA) so...
>
>On Fri, Oct 19, 2012 at 11:24 AM, Brian LeRoux <b...@brian.io> wrote:
>> Regarding:
>>
>> 
>>https://github.com/alunny/cordova-plugin-spec/issues/5#issuecomment-95827
>>05
>>
>> Looks like we do not have a lifecycle event for app launch/create in
>>iOS land:
>>
>> 
>>https://github.com/apache/incubator-cordova-ios/blob/master/CordovaLib/Cl
>>asses/CDVPlugin.h
>>
>> Any objections/concerns for having something like the Android plugin
>> init method?
>>
>> 
>>https://github.com/apache/incubator-cordova-android/blob/master/framework
>>/src/org/apache/cordova/api/CordovaPlugin.java#L39


Re: enhancing the plugin lifecycle for ios

Posted by Shazron <sh...@gmail.com>.
This is possible if somehow we can set which plugins can be "loaded"
at startup (or should all of them be loaded? seems wasteful). Right
now they are lazily loaded (on first use), so sending them a
"onAppLaunch" event (or equivalent) would do nothing since they are
not listening of course.

Now's a good time to resurrect this old thread :)
http://markmail.org/thread/hq2rd5lobbl4nkav
I like Patrick Mueller's suggestion in that thread - but we are
migrating to config.xml (no ETA) so...

On Fri, Oct 19, 2012 at 11:24 AM, Brian LeRoux <b...@brian.io> wrote:
> Regarding:
>
> https://github.com/alunny/cordova-plugin-spec/issues/5#issuecomment-9582705
>
> Looks like we do not have a lifecycle event for app launch/create in iOS land:
>
> https://github.com/apache/incubator-cordova-ios/blob/master/CordovaLib/Classes/CDVPlugin.h
>
> Any objections/concerns for having something like the Android plugin
> init method?
>
> https://github.com/apache/incubator-cordova-android/blob/master/framework/src/org/apache/cordova/api/CordovaPlugin.java#L39