Using Master Data with Phonegap?

Does it make sense to use the "Master Data" for storage in a hybrid iPhone / iPad application based on Phonegap? Our application will mainly work inside the UIWebView, but the data storage component will be central to the operation of the application. I know that Mobile Safari has autonomous storage capabilities that can be used through PhoneGap, but we already have a built-in solution for storing data on top of Core Data that we would like to use.

Thanks Kapil

+4
source share
3 answers

You can create a PhoneGap plugin, which is a custom extension for the PhoneGap API. It contains some native code that performs some of its own functions, as well as a JavaScript interface that then exposes this functionality to you, the PhoneGap developer. By definition, a plugin is platform specific!

In your case, you will create a plug-in that provides the base data API to the PhoneGap browser instance. Presumably, since you already have a bunch of code based on basic data, most of the work is done. You just need to write a JavaScript wrapper around it and form your own code so that it fits into the plugin template.

A good place to start would be to tell Jesse about them; Please note that they are specifically designed for iPhone:

http://blogs.nitobi.com/jesse/2010/04/01/iphonegap-plugs/

Here are some examples of existing PhoneGap plugins, their use, and links inside the source code to see how they were built:

https://github.com/phonegap/phonegap-plugins

http://blogs.nitobi.com/shazron/2010/07/12/phonegap-iads-plugin/

http://blog.urbanairship.com/blog/2010/06/09/phonegap-push/

Here is one of the StackOverflower participants and the defendant above, Aaron :)

http://blog.clearlyinnovative.com/post/1097750723/phonegap-plugin-for-downloading-url

Hope this helps!

+3
source

I think that if you have already made this investment, why not just write your own application?

you will need to do a few โ€œinterestingโ€ things so that PhoneGap integrates with your CoreData solution.

+1
source

Is it not possible to use the native LocalStorage PhoneGap interface (which is SQLite db, btw)?

http://docs.phonegap.com/en/2.5.0/cordova_storage_storage.md.html

+1
source

All Articles