Received: by 10.224.100.69 with SMTP id x5mr3034585qan.1.1331231111120; Thu, 08 Mar 2012 10:25:11 -0800 (PST) X-BeenThere: phonegap@googlegroups.com Received: by 10.224.53.12 with SMTP id k12ls5693827qag.5.gmail; Thu, 08 Mar 2012 10:24:52 -0800 (PST) MIME-Version: 1.0 Received: by 10.236.156.73 with SMTP id l49mr940041yhk.15.1331231092527; Thu, 08 Mar 2012 10:24:52 -0800 (PST) Authentication-Results: ls.google.com; spf=pass (google.com: domain of scott.a.padi...@gmail.com designates internal as permitted sender) smtp.mail=scott.a.padi...@gmail.com; dkim=pass header...@gmail.com Received: by y17g2000yqg.googlegroups.com with HTTP; Thu, 8 Mar 2012 10:24:52 -0800 (PST) Date: Thu, 8 Mar 2012 10:24:52 -0800 (PST) In-Reply-To: <18995666.2.1331229416520.JavaMail.geo-discussion-forums@yncd14> References: <95a66013-22c2-412f-a241-ac2da4e106a6@t8g2000yqg.googlegroups.com> <25150563.54.1331168977778.JavaMail.geo-discussion-forums@ynt13> <29898769.5.1331219777164.JavaMail.geo-discussion-forums@vbhz5> <22334281.962.1331221644932.JavaMail.geo-discussion-forums@ynnk21> <15468230.184.1331222274236.JavaMail.geo-discussion-forums@vbnd9> <18995666.2.1331229416520.JavaMail.geo-discussion-forums@yncd14> User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; GM_UserLogonTimeUTC: 2012-03-08 14:13:51; GM_UserLogonTimeBias: 300; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; .NET4.0C; .NET4.0E; GM_UserLogonTimeUTC: 2010-12-13 15:06:21; GM_UserLogonTimeBias: 300),gzip(gfe) Message-ID: <00305dd1-a452-4cc2-8139-01a601add5e5@y17g2000yqg.googlegroups.com> Subject: Re: LocalStorage or SQLite data will no longer be backup and can be deleted From: ScottP To: phonegap Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Actually, further back in this thread I adapted the process that Gaurav Tomar ( http://gauravstomar.blogspot.com/2011/08/prepopulate-sqlite-= in-phonegap.html ) uses to copy a prepopulated database over. My modifications basically look for the webkit database in both (pre and post iOS5.1) locations and if it needs then copy it to the documents folder. You can look at previous posts to see all the code changes I made to AppDelegate.m. Then you can use the native sqlite plugin found here: https://github.com/davibe/Phonegap-SQLitePlugin. This way you won't need to continually "backup" your sqlite database since you'll be using the plugin to natively connect to the DB file you copied to the documents folder already. So by using your workaround, Kerri for localstorage and this workaround for sqlite, I think we're ok moving forward... I'll be honest I haven't looked too closely at your localstorage workaround, but I'm guessing the code I'm using to copy the webkit DB over could be modified into a plugin to do just as you propose for the localstorage. On Mar 8, 12:56=A0pm, Kerri Shotts wrote: > Moving forward, I guess the only option is to assume that > localStorage/sqlite is no longer persistent (even though it is supposed t= o > be). Either do away with using it entirely, /OR/ implement some method th= at > persists it to the documents folder. (Which is what I do with localStorag= e. > Sqllite would probably be more painful...) > > The absolute best method to do that persistence would be to somehow copy > the file in the cache over to the documents folder at periodic intervals > (or when it has changed), and read it at startup to populate the cache. > Which is sorta what I do, only in Javascript... I may perhaps work on a > plugin that does this natively down the road. [I would assume better > performance, less risk from that kind of proposition. Plus the native cod= e > could be fired on suspend -- rather than with JS, I just write it out eve= ry > so often.] > > But for the current situation... *sigh* Apple was stupid and released wit= h > the bug, which means a lot of people are going to have their data wiped. > Short of digging back into the filesystem or an old backup, I don't know > any way to recover the data. :-( [[short of being jailbroken and using > iFile..., but that's not exactly an option we can suggest!]] > > > > On Thursday, March 8, 2012 9:57:54 AM UTC-6, mikem wrote: > > > The big issue is that there really is nothing I can do to fix this, you= r > > solution would work but there is no way to tell the people who download= ed > > my apps to do these steps (and they probably couldn't figure out how to= do > > it either) > > > Is there a solution yet so this doesn't happen moving forward? > > > On Thursday, March 8, 2012 10:47:24 AM UTC-5, Sam wrote: > > >> Yes, it sucks ! > > >> I think we should create a lot of bug report ( > >>https://bugreport.apple.com/), because it looks like Apple doesn't know > >> the importance of the phonegap dev community (that's why they didn't f= ix > >> the bug) > > >> On Thursday, March 8, 2012 10:16:17 AM UTC-5, mikem wrote: > > >>> Join the club... this bug sucks.. no real workaround as I can see to > >>> save my users data because a fix in my app will take at least 2 weeks= to > >>> get approved and in the hands of my users. > > >>> I just hope the most of the heat falls on Apple not my apps! > > >>> On Wednesday, March 7, 2012 8:09:37 PM UTC-5, Sam wrote: > > >>>> They did it. Apple has released their app with that bug. > >>>> I already got angry users that loose all their work on my app :-/ > > On Thursday, March 8, 2012 9:57:54 AM UTC-6, mikem wrote: > > > The big issue is that there really is nothing I can do to fix this, you= r > > solution would work but there is no way to tell the people who download= ed > > my apps to do these steps (and they probably couldn't figure out how to= do > > it either) > > > Is there a solution yet so this doesn't happen moving forward? > > > On Thursday, March 8, 2012 10:47:24 AM UTC-5, Sam wrote: > > >> Yes, it sucks ! > > >> I think we should create a lot of bug report ( > >>https://bugreport.apple.com/), because it looks like Apple doesn't know > >> the importance of the phonegap dev community (that's why they didn't f= ix > >> the bug) > > >> On Thursday, March 8, 2012 10:16:17 AM UTC-5, mikem wrote: > > >>> Join the club... this bug sucks.. no real workaround as I can see to > >>> save my users data because a fix in my app will take at least 2 weeks= to > >>> get approved and in the hands of my users. > > >>> I just hope the most of the heat falls on Apple not my apps! > > >>> On Wednesday, March 7, 2012 8:09:37 PM UTC-5, Sam wrote: > > >>>> They did it. Apple has released their app with that bug. > >>>> I already got angry users that loose all their work on my app :-/- H= ide quoted text - >