Return-Path: X-Original-To: apmail-cordova-dev-archive@www.apache.org Delivered-To: apmail-cordova-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 24B82DC38 for ; Fri, 30 Nov 2012 10:09:41 +0000 (UTC) Received: (qmail 7272 invoked by uid 500); 30 Nov 2012 10:09:40 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 7229 invoked by uid 500); 30 Nov 2012 10:09:40 -0000 Mailing-List: contact dev-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list dev@cordova.apache.org Received: (qmail 7195 invoked by uid 99); 30 Nov 2012 10:09:39 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Nov 2012 10:09:39 +0000 X-ASF-Spam-Status: No, hits=0.3 required=5.0 tests=FRT_ADOBE2,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of brian.leroux@gmail.com designates 209.85.220.175 as permitted sender) Received: from [209.85.220.175] (HELO mail-vc0-f175.google.com) (209.85.220.175) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Nov 2012 10:09:33 +0000 Received: by mail-vc0-f175.google.com with SMTP id fy7so279476vcb.20 for ; Fri, 30 Nov 2012 02:09:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=IOmChRm8hy/p5iT2CXMYjmSmHaLv885fBOGHOswkQYU=; b=vyl1O1kIO81p3yWROfchIGVMCzYKvN3XJpzDMVClOuSgdIwWRKmtTmWa39kIITezrM kY1+l0P632RJA5E4kk+/tyCUFH3CVlOn0M1wEiF3VeTzp/IEQTaod6bKxoiNa8QCe62R SlFvU2pvQ/vkLFL3UQ4d8hYOLTJEWRK2IIkDEb4O4r9CMXp9Td8vS8FS1JRdbUdaom3I FH7hOlLvJN+qXJ8LVLliaQJvlJ/CXOkIT36ngUBrGFbJeLyIo+lEko5706RC9xOP1fTK 2QeZqz1grhXIhdU0oOO0w1LQ1DGdYzX3tu+FNlx8nEUO5cWnNh+7W9v/hM33EnHBmBpX 70PQ== MIME-Version: 1.0 Received: by 10.220.150.145 with SMTP id y17mr610311vcv.11.1354270152250; Fri, 30 Nov 2012 02:09:12 -0800 (PST) Sender: brian.leroux@gmail.com Received: by 10.59.4.69 with HTTP; Fri, 30 Nov 2012 02:09:12 -0800 (PST) In-Reply-To: References: Date: Fri, 30 Nov 2012 11:09:12 +0100 X-Google-Sender-Auth: oZ2VWVz7Yn_lHE52CPpPCeEqW6c Message-ID: Subject: Re: WebNotifications plugin From: Brian LeRoux To: dev@cordova.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org Would this be an appropriate addition to the plugin dev guide or are there other events/scenarios we/re not considering? On Fri, Nov 30, 2012 at 6:57 AM, Filip Maj wrote: > I feel pretty dumb not thinking about this before.. > > O well, good thing Jesse is smrt! > > On 11/29/12 7:21 PM, "Ally Ogilvie" wrote: > >>Hi Chaps, >> >>For Cordova 1.9 we were able to receive these events without any >>modification to the AppDelegate by registering for didFinishLaunching >>notifications etc. in the class' load method. >> >>https://github.com/wcwynn/phonegap-plugin-localNotifications/blob/v1.9/ios >>/project/Plugins/LocalNotification/LocalNotification.m#L34 >> >>Party. >> >> >>On Fri, Nov 30, 2012 at 8:16 AM, Brian LeRoux wrote: >> >>> +1 to Jesse's suggestion of Party. And the events thing. >>> >>> On Thu, Nov 29, 2012 at 10:51 PM, Shazron wrote: >>> > Ok this is the essence of what the previous threads I linked to guys >>>:) >>> > >>> > >>> > On Thu, Nov 29, 2012 at 1:43 PM, Jesse >>>wrote: >>> > >>> >> Have the AppDelegate raise events when things like >>> >> 'didReceiveLocalNotification' happen. >>> >> Have plugins subscribe to the event. >>> >> Party. >>> >> >>> >> >>> >> On Thu, Nov 29, 2012 at 1:30 PM, Anis KADRI >>> wrote: >>> >> > It's tricky exactly because of that reason (i.e multiple plugins >>> editing >>> >> > the same files/methods). I don't see a clean solution to this >>>problem. >>> >> One >>> >> > way would be to just apply the patch. If it fails, notify the user >>>and >>> >> > prompt them to apply the code manually. Bright minds out there, >>>your >>> >> > thoughts are welcome. >>> >> > >>> >> > >>> >> > >>> >> > >>> >> > On Thu, Nov 29, 2012 at 12:39 PM, Filip Maj wrote: >>> >> > >>> >> >> I think I had discussions with someone about this particular >>>feature. >>> >> >> >>> >> >> What about having empty stubs for these functions that some >>>plugins >>> need >>> >> >> to hook into (I.e. didReceiveLocalNotification) and then have the >>> >> tooling >>> >> >> drop code in where necessary for these functions? This can be a >>> slippery >>> >> >> slope (multiple plugins battling over a single function) but not >>> worth a >>> >> >> shot? >>> >> >> >>> >> >> On 11/28/12 11:13 PM, "Anis KADRI" wrote: >>> >> >> >>> >> >> >On Wed, Nov 28, 2012 at 10:43 PM, Brian LeRoux >>>wrote: >>> >> >> > >>> >> >> >> would this not be an indication that we need to modify the >>>plugin >>> >> api? >>> >> >> >> (code munging would be a bad code smell for a pluggable >>> architecture >>> >> >> >> imo) >>> >> >> >> >>> >> >> > >>> >> >> >Yes. The current specification does not support this use case. >>> >> >> >I can't seem to find a clean/elegant solution to the problem. >>> diff'ing >>> >> >> >does >>> >> >> >not work well if there are multiple plugins appending code to >>> existing >>> >> >> >files. One option would just be to prompt the user to append the >>> code >>> >> >> >manually (but that would not be too cool with cordova-client). >>> >> >> > >>> >> >> >Shaz, I believe I understand that we can expand AppDelegate to >>> support >>> >> >> >even >>> >> >> >more overrides (including the didReceiveLocalNotification) but I >>> >> believe >>> >> >> >the real issue here is appending code in general and this issue >>>is >>> not >>> >> >> >limited to iOS. We can keep this on the backburner for now as it >>>is >>> not >>> >> >> >required by most plugins. >>> >> >> >>> >> >> >>> >> >>> >> >>> >> >>> >> -- >>> >> @purplecabbage >>> >> risingj.com >>> >> >>> >> >> >> >>-- >> [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 >