I personally have used HTML5 LocalStorage technique and PhoneGap File
API together, but when I submited to AppleStore, it was rejected due
to dataStorage guideline.
Application/Documents folder looks automatically backed up by iCloud,
and HTML5 localstorage is out of the world of iCloud, so using both
technique may occur inconsistency of the application behavior and
dangerous.
If you use HTML5 localStorage only for cash stuff, it would be no
problem, but I think now it's rather easier to design or safe to use
native storage via fileAPI for whole data which needs to be backup.
> --
> You received this message because you are subscribed to the Google
> Groups "phonegap" group.
> To post to this group, send email to phon...@googlegroups.com
> To unsubscribe from this group, send email to
> phonegap+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/phonegap?hl=en?hl=en
>
> For more info on PhoneGap or to download the code go to www.phonegap.com
Simon Mac Donald
http://hi.im/simonmacdonald
Simon Mac Donald
http://hi.im/simonmacdonald
https://developer.apple.com/icloud/documentation/data-storage/
I have used the localStorage technique for some 'index' file(small
data, frequently re-written) which have pointers to big data saved
with phoneGap API(this is stored to ApplicationDocument folder).
So, here is my guess:
They have 2 iOS devices with iCloud feature tuned on, then have my app
sync on the both devices via iCloud.
Obviously, there will be some inconsistency. I don't think my app
crashes or the inconsistency appears obvious, but I assume they
noticed somewhere.
This is the only possibility I can guess in terms of the storage
issue, so I re-designed to use phoneGap file API instead of
localStorage, that change is not trivial to me, because I needed to
manage async call backs for fileAPI.
Having said that
>I'm now assuming that as long as you use the File API only for
persistent storage, and LocalStorage only for temporary stuff/caching,
and don't mix them up, both techniques would be okay to use together
in an app.... right?
Yes, true.
I prefer to use localStorage especially in the middle of logic chain,
since it's sync and easier to handle,
but it turned out that mix usages logically like mine has problem for
iCloud backup. You should be careful.
Ken
My response to you would be as follows:
'a native bridge' can be done by someone who can write a Phonegap Plugin.
How big is the WebSQL data?
If it's small enough to handle, if I were in your case, I write some
js code to back up to the document folder via fileAPI, and reconstruct
the WebSQL database periodically.
Thanks.
I have created a bug report :
https://bugreport.apple.com/cgi-bin/WebObjects/RadarWeb.woa/6/wo/6Lqn29SZtTD1dEAqAUY0ow/15.83.28.0.9
Yes, you are right. I wanted to warn phonegap users, because the
problem is critical IMHO..
I'll post my JS DB sync code in Github ASAP if any of you are
interested.
We were talking about a beta. You should read this thread :
https://devforums.apple.com/message/606269#606269
We just need that everyone concerned create a bug report. Hopefully
Apple will fix that before public release.
On Friday, February 3, 2012 at 5:59 PM, Kerri Shotts wrote:
Thinking aloud now; I wonder what the performance hit would be of creating a localStorage-like native plugin for phoneGap that stored the data in a place that we /know/ will get backed up / sync'd, etc. My app is pretty much using localStorage to store everything, including treating it like a mini-database (without the need for relational data and questions-- so more like a big keyed array). Since it's a fast to access, I don't always offload the contents into another array, so I wonder what the hit would be in going from js to native and back again inside a loop.Guess there's only one way to find out: build a plugin and see how it goes... ;-) Wish me luck.
--
You received this message because you are subscribed to the Google
Groups "phonegap" group.
To post to this group, send email to phon...@googlegroups.com
To unsubscribe from this group, send email to
phonegap+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/phonegap?hl=en?hl=en
For more info on PhoneGap or to download the code go to www.phonegap.com