chrisben / imgcache.js

JS library based on the File API to cache images for offline recovery (target: cordova/phonegap & chrome)
Other
826 stars 216 forks source link

Cached files lost on iOS after application update #135

Closed borabilgin closed 8 years ago

borabilgin commented 9 years ago

It seems like on iOS 8 (Phonegap), after updating the application, I am losing the images that I cached previously. By the way, usePersistentCache is set to true in my setup.

I'm not 100% sure as I am updating my app through Phonegap Build, but wanted to check if this is in fact the expected behavior or not. If so, is there a way to preserve the cached files after an upgrade?

Thanks

chrisben commented 9 years ago

It looks like the Cordova File Plugin that ImgCache uses to write images to the iOS filesystem offers an option in config.xml to define where the files should be stored and avoid this issue. Have a look at this page. If you find a solution please share it with others.

jblok commented 8 years ago

Changing the value of iosPersistentFileLocation to Library in config.xml, as the linked article suggests solved it for me. I also needed to update the version of imcache.js to the latest.

chrisben commented 8 years ago

I add this information to the CORDOVA.md documentation. Cheers.