Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS safari support indexedDB #145

Open
matthias62 opened this issue Jan 8, 2018 · 6 comments
Open

iOS safari support indexedDB #145

matthias62 opened this issue Jan 8, 2018 · 6 comments

Comments

@matthias62
Copy link

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

@scotttrinh
Copy link
Owner

scotttrinh commented Jan 8, 2018

@matthias62

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.

@scotttrinh
Copy link
Owner

@scotttrinh scotttrinh self-assigned this Jan 8, 2018
@scotttrinh scotttrinh added this to the 2.0.0 milestone Jan 8, 2018
@itjustwerks
Copy link

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?

@scotttrinh
Copy link
Owner

@itjustwerks

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?

@itjustwerks
Copy link

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.

@scotttrinh
Copy link
Owner

I've not had to do this, but can you use localforage.INDEXEDDB instead of asyncStorage?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants