WKWebView WebStorage can be cleaned by iOS8

Discussion and feedback on Construct 2

Post » Sat Dec 06, 2014 4:41 am

It seems like a massive oversight, but on WKWebView local storage using the WebStorage plugin (or even Save) is prone to be removed by iOS8's default auto-cleaning process if the device runs out of storage space.

The files generated NEED to be special flagged to ensure iOS8 skip it when it checks for things to delete (temporary webfiles, browsing cache, files generated by apps).

:o
B
70
S
24
G
19
Posts: 1,757
Reputation: 17,614

Post » Sat Dec 06, 2014 4:51 am

Wow, that's a bummer. But wait...do you mean it is possible to 'flag' webstorage content so this won't happen? Or am I misunderstanding you? :|

If you mean we need to get Apple to change something in iOS... :?
Don't lose your work. Backup your game with Dropbox.
B
44
S
10
G
10
Posts: 1,106
Reputation: 9,202

Post » Sat Dec 06, 2014 4:57 am

From my reading, files generated can be flagged to avoid the auto-cleaning process of iOS. Without this flag, the system is free to randomly delete stuff when you are low on storage space.
B
70
S
24
G
19
Posts: 1,757
Reputation: 17,614

Post » Sat Dec 06, 2014 5:04 am

So, does C2 generate 'flagged' webstorage data, or not? If not, sounds like a case for Ashley. :ugeek:
Don't lose your work. Backup your game with Dropbox.
B
44
S
10
G
10
Posts: 1,106
Reputation: 9,202

Post » Sat Dec 06, 2014 5:12 am

Well it's not flagged, because it's deleted, losing save game progress. :(

I'm going to cop a shit storm for Star Nomad Elite on iOS due to this.. lots of iDevices often run low on storage due to no external microSD options.

I posted it to @ludei troubleshooting site too, since I don't know where the problem occurs, C2's WebStorage plugin or CJS WebView+ implementation of extra generated files.

Edit: IF and when Phonegap implements WKWebView, they would also need to be wary of this issue.
B
70
S
24
G
19
Posts: 1,757
Reputation: 17,614

Post » Sat Dec 06, 2014 6:03 am

I know. It baffles me that Apple is still making an iphone with a measly 16gb of storage and NO external storage options. I mean, seriously?

Can you imagine a laptop manufacturer pitching a laptop with 16gb of internal storage, and no microsd/sd/usb slots? :roll:
Don't lose your work. Backup your game with Dropbox.
B
44
S
10
G
10
Posts: 1,106
Reputation: 9,202

Post » Sat Dec 06, 2014 2:39 pm

I'm not sure there's anything we can do about this from the C2 engine, the WKWebView still looks just like a browser. I think it's up to whoever provides the build system that uses WKWebView. I'm assuming it has some kind of API to mark files as permanent? Or if not maybe Apple need to add support for that - I've read WKWebView has a few bugs and missing features compared to the old web view.
Scirra Founder
B
395
S
232
G
88
Posts: 24,371
Reputation: 193,772

Post » Sun Dec 07, 2014 12:09 am

Ashley wrote:I'm not sure there's anything we can do about this from the C2 engine, the WKWebView still looks just like a browser. I think it's up to whoever provides the build system that uses WKWebView. I'm assuming it has some kind of API to mark files as permanent? Or if not maybe Apple need to add support for that - I've read WKWebView has a few bugs and missing features compared to the old web view.


Thanks for the clarification. Hopefully ludei can look into it also.
B
70
S
24
G
19
Posts: 1,757
Reputation: 17,614

Post » Mon Dec 08, 2014 9:34 am

Does this affect the Canvas+ apps also?
Image
B
96
S
36
G
17
Posts: 351
Reputation: 15,903

Post » Mon Dec 08, 2014 11:36 am

robotecollective wrote:Does this affect the Canvas+ apps also?


I'm not sure, but I read iOS8's auto-clean is allowed to go after temporary generated files or browser generated files when space is low.

I already have 2 users leaving me a 1 star rating cos they lost their save, that's AFTER I put a warning in the app description that they should not be very low or out of storage space else their auto save won't work. People just don't read app descriptions these days!
B
70
S
24
G
19
Posts: 1,757
Reputation: 17,614

Next

Return to Construct 2 General

Who is online

Users browsing this forum: goodboy69, The Mnk and 26 guests