I have an iPhone app that I built using PhoneGap. I’m now looking to convert this to a native app. As part of the functionality people have been able to store notes using the normal HTML 5 Web SQL database. If at all possible I’d like to prevent existing users from losing their notes so I was wondering if I could access the previous database from the new, native iPhone app.
If not, does anyone have any suggestions on how to successfully migrate the data over. Thanks a lot for your time, I appreciate it.
Use Xcode’s 4.x Organizer window to view your app on a device and see where in the app’s sandbox file structure that the UIWebview is storing it’s data.
Another possibility is to have a hidden UIWebview function check for an existing HTML5 database, and, if data is present, passing that data back up to the app as part of some stringByEvaluatingJavaScriptFromString: calls to the web view. Or pass an empty string back for no existing data.