marcucio / Cordova-WP-SqlitePlugin

14 stars 20 forks source link

Support for Cordova 3.0.0 #12

Open jonathannaguin opened 10 years ago

jonathannaguin commented 10 years ago

Any plan to support the new version of Cordova PhoneGap 3.0.0?

Thank you

marcucio commented 10 years ago

I won't be making too many changes until we circle back around to updating our windows phone app (it might be a few months). At this time we probably will update for Cordova 3. In the meantime I am willing to take any updates from other people if anyone else wants to tackle this.

andmar8 commented 10 years ago

Hey, I'd just like to report that I have succesfully managed to port your code to a cordova 3.0.0 plugin.

Basically the main problems with the current code are....

I'm intending to create a new repository soon...

https://github.com/andmar8/Cordova-WP-SqlitePlugin

marcucio commented 10 years ago

Thats great, let us know when it is posted so that I can incorporate the changes

On Sep 29, 2013, at 7:56 AM, Andrew Martin notifications@github.com wrote:

Hey, I'd just like to report that I have succesfully managed to port your code to a cordova 3.0.0 plugin.

Basically the main problems with the current code are....

compiling up and deploying the right sqlite library adjusting the SqlitePlugin.cs and sqlitePlugin.js open functions to correctly pass and deserialize JSON I'm intending to create a new repository soon

— Reply to this email directly or view it on GitHub.

andmar8 commented 10 years ago

The plugin project layout is quite different to the phonegap 2.x plugin as it uses the new plugin system where you create a plugin.xml and have a .js www and .cs src directories, so you may have to wade through it. However, what it does mean is you "could" unify the android, ios and wp8 version of this same plugin into 1 downloadable plugin :)

Thanks for writing this stuff though, never would have gotten this far without it!

brodybits commented 10 years ago

@andmar8 first, I would like to express a big thank you on behalf of all community users. I have also spent a lot of the weekend getting this plugin to work with Cordova 3.0 but in a different way:

Then the test ran OK for me.

The positive of this (my) approach is that we can provide a truly compliant sqlite plugin for 3.0. The downside is that this could be a bit messy to maintain. I do plan to share my changes pretty soon but would really rather clean it up a little first.

I had already started to distribute the Android & iOS versions together. @ef4 (Edward Faulkner) had already contributed a fail-safe transaction mechanism for the iOS version, and I get it working also for the Android version. I am planning to get it working with the WP8 version as well and then it should be possible to distribute all three versions together.

Something else: I believe that both of our dependencies sqlite-net and csharp-sqlite were designed to work with both WP7 and WP8. So far I have only tested with WP8.

Chris

andmar8 commented 10 years ago

Hi brody bits, I just pushed my plugin code with full instructions to here...

https://github.com/andmar8/Cordova-WP-SqlitePlugin

http://docs.phonegap.com/en/3.0.0/guide_platforms_wp8_plugin.md.html#Windows%20Phone%20Plugins_common_pitfalls

I'm glad to hear that the android and ios is already together, hopefully you should (at least) be able to take inspiration from my approach, it may be a little less messy than how you've done it (if I may be so bold!!!)

I very much would like to see this plugin developed against a better sqlite library ( the official microsoft one on nuget would make the most sense??), but I don't understand enough of the code to do it myself.

EDIT: just tested my docs including downloading plugin from git, works perfectly :)