iOS safari support indexedDB
matthias62 opened this issue · 6 comments
When loading my app in under iOS 11.1.2 / safari localForage always uses webSQLStorage driver instead of indexedDB. Even the attempt to force the driver either in config or by using setDriver fails and the driver() function always provides webSQLStorage. Actually indexedDB should be supported since iOS 10.2. Looking into the localForage issues there is no clear statement whether indexedDB is now supported or not. I must save quite big data on the client side and think the alternatives like local Storage and webSQLStorage will not work for my application.
Best regards
Matthias
I know the latest version of localForage recently switched over to using IndexedDB on iOS by default, and we've not followed them over since that's really a breaking change. However, I wasn't aware that you couldn't opt into it in this older version. I agree that it's not ideal for you to be stuck with WebSQL when IndexedDB is available on your platform.
I'd like to double-check that there isn't any way to use IndexedDB on iOS with the current setup, and assuming I find the same thing as you, we should prioritize trying to update to the latest localForage, even if that means bumping to a new major version.
Any update on this? My app needs the storage capacity of IndexDB to function for some users. What's involved in updating angular-forage to use localForage ^1.7?
You can already insist on using IndexedDB if you have to have it for your application: https://localforage.github.io/localForage/#settings-api-setdriver. You just need to call setDriver(localforage.INDEXEDDB)
. Does that work for your case?
I tried setting the drive to "asyncStorage" and am getting "Error: No available storage method found" in Safari on Mac OS. Without the specific setdriver, I get a non-specified WebSQL error.
I've not had to do this, but can you use localforage.INDEXEDDB
instead of asyncStorage
?