Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Making a very small Hello World Application with Sencha that writes to local storage I could reproduce this behavior. It seems like on application exit, it will write a copy of the localstorage file to the /Documents folder.</p> <p>This seemed suspicious to me and it reminded me of the PhoneGap patch for iOS 5.1 that backs up the localStorage file also.</p> <p>With iOS 5.1 Apple started to put the localStorage file in the Library/Caches folder which broke many applications because the data was no longer reliable stored. So PhoneGap and others started to implement Workarrounds that backup the localStorage file to the documents folder and automatically restore it if needed.</p> <p>Trying to find proof that Sencha does something similar, I opened up the resulting .app package and found a stbuild_template file that contains the native wrapper code. It is of course compiled, but searching for the string "localStorage" results in some interesting results like:</p> <pre><code>restoreLocalStorage preserveLocalStorage Could not remove source file while backing up localstorage Could not copy localstorage backup . Caches WebKit/LocalStorage .file__0.localstorage file__0.localstorage SNLocalStoreageFix </code></pre> <p>Also I found a lot of references to NimbleKit which seems to be used internally for the packaging.</p> <p>This thread also hints at a solution for the iOS 5.1 local storage problem in Sencha Touch 2.1 which is what the OP is using: <a href="http://www.sencha.com/forum/showthread.php?194674-Localstorage-and-native-iOS-5.1-apps&amp;s=04149e771f9c4eea15cb6f6d97069ff6" rel="nofollow">http://www.sencha.com/forum/showthread.php?194674-Localstorage-and-native-iOS-5.1-apps&amp;s=04149e771f9c4eea15cb6f6d97069ff6</a></p> <p>All this is evidence for me that Sencha implemented a workarround for iOS 5.1 which will put the localStorage in the /Documents folder. Since you only use the localStorage file for caching, Apple rejected you because you store non-user data in /Documents.</p> <p>I think using PhoneGap there is an option to disable this backup. So you might want to consider using this or ask Sencha if they have a similar option to disable it.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload