incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ally Ogilvie <aogil...@wizcorp.jp>
Subject Re: Plugin Format and Spec
Date Wed, 27 Jun 2012 01:57:58 GMT
Yup 1.1 is outdated, I wanted to give you guys structure example with both
Android and iOS in the repo.

For Cordova goodness look at 1.7
https://github.com/Wizcorp/phonegap-plugin-wizViewManager/tree/v1.7
(same repo diff branch - see before post on versioning)

While we are in development we usually make a local fork of the repo and
merge in so the repo has stable branches matching each Cordova version (coz
we know you guys love those rolling releases! :p )

That way, if we make a project based on Cordova 1.8 we can;
a) know what plugins are supported with our choice of Cordova (if the
branch number exists or not)
b) quickly pull in a version of the right plugin that matches our Cordova
version.

There are a lot of reasons for the above type structure but the main was we
looked at the "official" plugin repo, and plugins were separated by
platform which confused us a lot... if cross-platform scripting is the goal
I want to see plugin first, support platforms inside (sub dir or whatever).

for WizViewManager...
Looking at the PG 1.1 repo (and also mainViewController.m for CDV 1.7) if
we can get the shouldStartLoadWithRequest into the plugin.m for example
that would be awesome using CDV webView delegate or something.



On Wed, Jun 27, 2012 at 4:50 AM, Shazron <shazron@gmail.com> wrote:

> Great - also, there is an undocumented way to handle "unknown" schemes
> that your plugin can hook into, which is even better:
>
> 1.
> https://github.com/apache/incubator-cordova-ios/blob/master/CordovaLib/Classes/CDVLocalStorage.m#L319-342
> 2.
> https://github.com/apache/incubator-cordova-ios/blob/master/CordovaLib/Classes/CDVPlugin.m#L49
> 3.
> https://github.com/apache/incubator-cordova-ios/blob/master/CordovaLib/Classes/CDVPlugin.m#L103-112
>
> But of course, this scheme must _not_ be in use by any other app (I
> would add some guid in there)
>
>
> On Tue, Jun 26, 2012 at 12:43 PM, Andrew Lunny <alunny@gmail.com> wrote:
> > Ah okay - I was referring to this plugin referenced upthread:
> > https://github.com/Wizcorp/phonegap-plugin-wizViewManager/tree/v1.1
> > specifically this code:
> >
> https://github.com/Wizcorp/phonegap-plugin-wizViewManager/blob/v1.1/ios/project/Classes/AppDelegate.m
> >
> > That code looks a little outdated (pre Cordova rename); if there's a
> better
> > way to achieve the same goal, awesome.
> >
> >
> > On 26 June 2012 12:34, Shazron <shazron@gmail.com> wrote:
> >>
> >> Thanks for the fix Andrew!
> >>
> >> Not sure what you are referring to regarding
> >> shouldStartLoadWithRequest -- this does not occur in the AppDelegate
> >> anymore (the app delegate does not implement the UIWebDelegate
> >> interface). This is handled in the CDVViewController - which in the
> >> app template, your MainViewController subclasses.
> >>
> >> Even so, I'm not sure why plugins need to hook into this? If they do,
> >> since all plugins have access to the UIWebView, they can "override"
> >> the UIWebViewDelegate from the webView.delegate property, like how I
> >> did it for the iOS 5.1 localStorage fix (and forward the message on,
> >> etc):
> >>
> >> 1.
> >>
> https://github.com/apache/incubator-cordova-ios/blob/master/CordovaLib/Classes/CDVLocalStorage.m#L102
> >> 2.
> >>
> https://github.com/apache/incubator-cordova-ios/blob/master/CordovaLib/Classes/CDVLocalStorage.m#L319-342
> >>
> >> On Tue, Jun 26, 2012 at 12:10 PM, Andrew Lunny <alunny@gmail.com>
> wrote:
> >> > Re node 0.8: package.json is updated in version 0.3.4. All can
> rejoice.
> >> >
> >> > Re speccing engine versions: I commented on Fil's pull request. It's
> >> > mostly
> >> > all good.
> >> >
> >> > @Ally - looking at that repo, the only thing you're doing that's not
> >> > supported in the current version of the spec is modifying the
> >> > AppDelegate
> >> > class (the shouldStartLoadWithRequest method). I wonder what the best
> >> > way
> >> > to do that programmatically would be - any thoughts Shaz? Perhaps
> have a
> >> > delegate of the app delegate that plugins can hook into?
> >> >
> >> > On 25 June 2012 19:08, Ally Ogilvie <aogilvie@wizcorp.jp> wrote:
> >> >
> >> >> Hi All :)
> >> >>
> >> >> Our current build hub at Wizcorp has plugins in separate repos
> already.
> >> >> Each plugin repo is version branched.
> >> >> We have a config for each project which contains required plugin name
> >> >> (matching repo) and versions (as well as many other things).
> >> >> We clone each plugin repo from branch = version recursively and
> inject
> >> >> code
> >> >> or xml/plist data where necessary.
> >> >>
> >> >> I'd really like to sync the structure you guys have as most likely
> >> >> people
> >> >> will use your format as de facto for setting up plugin repos ;)
> >> >> Also, @ https://github.com/alunny/cordova-plugin-spec
> >> >> ^ I noticed your happy to dump all your HTML in www dir. I suggest
> sub
> >> >> dirs
> >> >> as some developers dont want a 100 files at root www.
> >> >> maybe;
> >> >>
> >> >> www/phonegap/js/cordova.js
> >> >> www/phonegap/plugins/yourPluginName/plugin1.js
> >> >> www/phonegap/plugins/yourPluginName/plugin2.js
> >> >>
> >> >> our full repo setup is as such;
> >> >> https://github.com/Wizcorp/phonegap-plugin-wizViewManager/tree/v1.1
> >> >>
> >> >> Thanks!
> >> >>
> >> >> On Tue, Jun 26, 2012 at 9:50 AM, Shazron <shazron@gmail.com>
wrote:
> >> >>
> >> >> > Anis can chime in - he was testing with it and reported the error.
> I
> >> >> > believe the error was in the parser functionality in that module
(I
> >> >> > assume in parsing the .xcodeproj file).
> >> >> >
> >> >> > On Mon, Jun 25, 2012 at 5:31 PM, Patrick Mueller <
> pmuellr@gmail.com>
> >> >> > wrote:
> >> >> > > On Mon, Jun 25, 2012 at 8:19 PM, Shazron <shazron@gmail.com>
> wrote:
> >> >> > >
> >> >> > >> It was explained to me that even numbered versions are
> considered
> >> >> > >> unstable
> >> >> > >>
> >> >> > >
> >> >> > > Even numbered versions are stable - 0.6.x, 0.8.x; odd versions
> >> >> > > aren't
> >> >> > > stable - 0.7.x, etc;
> >> >> > >
> >> >> > >
> >> >> > >
> >> >> >
> >> >>
> >> >>
> http://en.wikipedia.org/wiki/Software_versioning#Odd-numbered%5Fversions%5Ffor%5Fdevelopment%5Freleases
> >> >> > >
> >> >> > > Isn't this just a matter of removing
> >> >> > >
> >> >> > > "engines": {
> >> >> > >    "node": "~0.6.7"
> >> >> > >  }
> >> >> > >
> >> >> > >
> >> >> > > from the package.json?  Or is there really some reason we
need
> >> >> > > this?
> >> >> > >
> >> >> > > --
> >> >> > > Patrick Mueller
> >> >> > > http://muellerware.org
> >> >> >
> >> >>
> >> >>
> >> >>
> >> >> --
> >> >> Ally Ogilvie
> >> >> Lead Developer [ iOS, Android ]
> >> >> Mobile Devices
> >> >>
> >> >> [image:
> >> >>
> >> >>
> >> >>
> http://www.wizcorp.jp/wp-content/themes/business-lite/images/all/wizcorp-logo.png
> >> >> ]
> >> >>
> >> >> 3-10-14-6F Higashi Nihombashi,
> >> >> Chuo-ku
> >> >> 103-0004, Tokyo
> >> >> Tel: (+81)3-4550-1448
> >> >> E-mail: aogilvie@wizcorp.jp
> >> >>
> >
> >
>



-- 
Ally Ogilvie
Developer [ iOS, Android ]
Mobile Devices

[image:
http://www.wizcorp.jp/wp-content/themes/business-lite/images/all/wizcorp-logo.png]

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

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