Return-Path: X-Original-To: apmail-incubator-callback-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-callback-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5B56BD356 for ; Mon, 22 Oct 2012 04:11:35 +0000 (UTC) Received: (qmail 97764 invoked by uid 500); 22 Oct 2012 04:11:35 -0000 Delivered-To: apmail-incubator-callback-dev-archive@incubator.apache.org Received: (qmail 97704 invoked by uid 500); 22 Oct 2012 04:11:34 -0000 Mailing-List: contact callback-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: callback-dev@incubator.apache.org Delivered-To: mailing list callback-dev@incubator.apache.org Received: (qmail 97647 invoked by uid 99); 22 Oct 2012 04:11:32 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Oct 2012 04:11:32 +0000 X-ASF-Spam-Status: No, hits=-1.3 required=5.0 tests=FRT_ADOBE2,RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of fil@adobe.com designates 64.18.1.35 as permitted sender) Received: from [64.18.1.35] (HELO exprod6og115.obsmtp.com) (64.18.1.35) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Oct 2012 04:11:25 +0000 Received: from outbound-smtp-1.corp.adobe.com ([192.150.11.134]) by exprod6ob115.postini.com ([64.18.5.12]) with SMTP ID DSNKUITHWEJaFGQuvheDZFqt3+Zqxb9h3Hps@postini.com; Sun, 21 Oct 2012 21:11:04 PDT Received: from inner-relay-1.corp.adobe.com ([153.32.1.51]) by outbound-smtp-1.corp.adobe.com (8.12.10/8.12.10) with ESMTP id q9M48L1v005072 for ; Sun, 21 Oct 2012 21:08:21 -0700 (PDT) Received: from nacas03.corp.adobe.com (nacas03.corp.adobe.com [10.8.189.121]) by inner-relay-1.corp.adobe.com (8.12.10/8.12.10) with ESMTP id q9M4B3Nc012525 for ; Sun, 21 Oct 2012 21:11:03 -0700 (PDT) Received: from nambxv01a.corp.adobe.com ([10.8.189.95]) by nacas03.corp.adobe.com ([10.8.189.121]) with mapi; Sun, 21 Oct 2012 21:11:03 -0700 From: Filip Maj To: "callback-dev@incubator.apache.org" Date: Sun, 21 Oct 2012 21:11:00 -0700 Subject: Re: enhancing the plugin lifecycle for ios Thread-Topic: enhancing the plugin lifecycle for ios Thread-Index: Ac2wC0Bp058HwwzITX2p5eeWiOt/iw== Message-ID: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.2.4.120824 acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org 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" 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 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" 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 wrote: >> > >> >> Koolaide, I added a subtask. >> >> >> >> On Fri, Oct 19, 2012 at 3:02 PM, Shazron 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 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 >>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 >> >>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 >> wrote: >> >> >>>>>> Plugin Manager in java land loads plugins defined with the >> >>'onload' >> >> >>>>>> attribute right away, otherwise lazy loads them. >> >> >>>>>> >> >> >>>>>> >> >> >> >> >>=20 >>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" 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 >> >>wrote: >> >> >>>>>>>> Regarding: >> >> >>>>>>>> >> >> >>>>>>>> >> >> >>>>>>>> >> >> >> >> >>=20 >>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: >> >> >>>>>>>> >> >> >>>>>>>> >> >> >>>>>>>> >> >> >> >> >>=20 >>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? >> >> >>>>>>>> >> >> >>>>>>>> >> >> >>>>>>>> >> >> >> >> >>=20 >>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 >> >> > > >--=20 > [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