i guess i don't need to describe the problem regarding "apple moved localstorage to cache-directory on iOS 5.1" again...
I found a PhonegapPlugin (on github) to implement a native localstorage.
Are there any plans to include that into phonegap build?
Or in other words: Are there any plans to get localstorage back working for phonegapbuild-apps?
Because right now a phonegap-iOS-build cannot use persistent localstorage anymore...
I tried to package our app in xcode using phonegap 1.5.0 but that didn't work either because of errors regarding autorelease and ARC.
Looks like the wiki-tutorial for iOS is outdated...
So i depend on phonegapbuild and therefore cannot publish for iOS 5.1 any more... :-(
Is a solution in the pipeline?
Help get this topic noticed by sharing it on
Twitter,
Facebook, or email.
Twitter,
Facebook, or email.
This topic is no longer open for comments or replies.
-
As I understand it:
- If you need persistent storage on iOS 5.1, use PhoneGap's File API
- A later release of Cordova may patch localStorage, or have a similar persistent key-value API; in this case, PhoneGap Build would support that
- If there's sufficient demand for the Plugin, we would include it on PhoneGap Build
- It may be possible to develop a high-level key-value store on top of the File API. I'll look into what's involved there.
-
-
As there is already a phonegap-solution available to implement persistent localstorage (http://pastebin.com/5881768B) it would be a lot easier if phonegap-build would just use that implementation to get back persistent localstorage just as the mighty specificators intended :-)
To use the file API would also include changes for all the other platforms (e.g. Android) as it is the same code. So there would be a lot of testing necessarry as on the contrary that proposed change (see link above) would solve the problem at its root and all the phoengap-apps around could stay as they are - using localstorage independent of the platform the app is running.
I would greatly appreciate if phonegap-build would produce usable packages again with the same behaviour on every platform (the quite well-documented quirks left aside) just as it was the case before iOS 5.1 came around.
Phonegap-build is a wonderful thing - don't let it rot just because Apple makes stupid decisions... -
-
It looks as though Shazron will merge something in before the 1.6.0 release:
https://issues.apache.org/jira/browse...
That should solve the issue - if the fix is easy enough, we'll backport it to 1.5.0 (which will be on PhoneGap Build next week). -
-
I assume the fix did not make it into 1.5.0. Any time frame on the release of 1.6.0 to address this?
-
-
1.6.0 should be out next week.
I'm going to review the patch that has been created for 1.5.0 to see if we can fit it in before 1.6.0 is on PG Build. -
-
Looking forward to it. My statistics show users abandoning ship as their settings are wiped over and over, after each app restart.
This is a critical error that must be patched as soon as possible. Remember there's also a delay from Apples app approval process to consider.-
What I'm saying is: _please_ give this bug high priority, as it's devestating for our apps.
-
-
-
-
Just to clarify...
I am currently using HTML5's "localstorage" to persist data. Will the "fix" prevent this data from being lost after a restart? Or should I be looking into using the PhoneGap localstorage or database APIs with my PG Build app?
Also, any update on 1.6 with the fix? -
-
1.6 will be out later this week, with the fix.
Backporting the fix to 1.5.0 on PG Build is a priority for this week - I hope to have an update for you guys soon. -
-
Big problem for all my apps on App Store.... i'm waiting everiday for the fix.... please.
-
-
I've deployed this patch for 1.5.0 on PhoneGap Build now - please let me know if there are any issues.
-
-
I rebuilt my app on phonegapbuild but localstorage keeps disappearing after the app or device gets restarted.
Tested on an iPad1 running iOS 5.1
The App in phonegapbuild is set to use phonegap-version 1.5.0 and config.xml also encloses .
Did i miss something? -
-
-
-
Andrew:
There seems to be multiple ways of using localStorage:
1. via PhoneGap's API's
2. using HTML5's localStorage directly in Javascript.: localStorage["key1"] = 'value';
Can you confirm that the fix addressed both of these methods?
I use the HTML5 method and although rebuilding my app this morning seems to work, the "failures" I had been seeing were inconsistent, so I'd like to be sure that this way of using localStorage was indeed addressed. -
-
-
Our App uses HTML5s localstorage.
The deployment seems not to have fixed the issue for HTML5's localstorage as the problem still exists on our Test-iPad running iOS 5.1 with the rebuilt app built with phonegapbuild.
Andrew: Could you post a pastebin-link or similar with the patch, so we can examine why the problem still exists for HTML5's localStorage?
Thanks a lot! -
-
i'm working with iphone 4 iOS 5.1 and i use html5 localstorage in javascript. now seems to work the fix. after restart the iphone or killingthe app.
-
-
i'm working with iphone 4 iOS 5.1 and i use html5 localstorage in javascript. now seems to work the fix. after restart the iphone or killingthe app.
-
-
After restarting the test-device to problem was gone.
Thanks a lot Andrew for solving this problem for us! -
-
There is a long discussion of this patch here:
https://issues.apache.org/jira/browse...
The implementation of the patch copies and saves the localStorage/webSQL DBs on app termination, and restores those databases when the app restarts. You may need to kill the app and/or restart the device, from what the reports look like. -
-
Sadly one needs to kill the app several times each time after one updates the app. If the "right" localstorage-backup was not found another (temporary) copy gets created and used. But if the app gets killed and restarted again that "temporary" localstorage disappears and the "old" localstorage ist back. It's usable, but hard to describe to the users. "Start and stop the app until the settings are back but never ever start using the app if the settings could not be found as this usage will be lost upon next restart..."
I can only describe the outcome as i couldn't debug the actual locations on the devices filesystem.
Any chance the solution will improve soon? Maybe alongside 1.6.0? When will 1.6.0 be available on PGB? -
-
The current fix will probably be in 1.6.0 and hopefully will be improved as more people have feedback. Unfortunately it's a bit out of our hands when Apple changes behaviour that's been working for the last 3 years and that follows the Web Storage spec - it's not clear if the old behaviour will be back in 5.2, or 5.1.1 or whatnot.
1.6.0 will be available on PGB shortly after it's released and available on phonegap.com. -
-
First: Thanks a lot andrew for your time on this issue!
I meant: will the current fix improve as the current method of backup/restore comes alongside the described sideeffects...
Shazron Abdullah described this as normal... :-(
As we don't know wich version of the patch was deployed by you: Do you watch the progress on https://issues.apache.org/jira/browse... to make that available in PGB soon so the sideeffects disappear?
When will we have a long-term solution instead of the current backup/restore? -
-
-
-
Yes, the fix was backported to 1.5 on PhoneGap Build.
I'll close this thread for now. If you're building a new app, I would recommend targeting 1.7.0. -
Loading Profile...




