WKWebView WebStorage can be cleaned by iOS8

0 favourites
From the Asset Store
An exploration and Spring Cleaning! Find and return items to their proper place.
  • 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).

  • 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...

  • 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.

  • So, does C2 generate 'flagged' webstorage data, or not? If not, sounds like a case for Ashley.

  • 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.

  • 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?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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.

  • 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.

  • Does this affect the Canvas+ apps also?

  • 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!

  • > 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!

    Ouch, so sorry for you. It sucks when people don't read the descriptions and leave 1 star ratings, been there.

    It seems this can affect every game that uses webstorage then. Oh. Shit.

  • I also just bought your game, nice work! Check your reviews.

  • Is this also an issue with a phonegap application?

  • So, to clarify, this is an exporter issue? If so, couldn't we notify the CocoonJS/Phonegap/Crosswalk devs and ask that they 'flag' webstorage keys so they won't be deleted?

    Has anyone seen this happen in a browser based game?

  • Thanks! Hope you enjoy it.

    hazneliel

    TiAm

    It seems to be a WKWebView problem since I never encountered it for other exporters. So it could potentially be an Apple problem where their WKWebView generated files are flagged temporary & thus, safe to clean for storage space. I have to wait for ludei's response and see what they think the problem is. If its Apple, then probably it will be fixed in the next iOS update.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)