cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anis KADRI <anis.ka...@gmail.com>
Subject Re: WebNotifications plugin
Date Thu, 29 Nov 2012 21:30:50 GMT
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 <fil@adobe.com> 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" <anis.kadri@gmail.com> wrote:
>
> >On Wed, Nov 28, 2012 at 10:43 PM, Brian LeRoux <b@brian.io> 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.
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message