iOS8 & indexedDB #254

Closed
ocombe opened this Issue Sep 26, 2014 · 17 comments

Projects

None yet

8 participants

@ocombe

It seems that Apple screwed up the iOS8 indexedDB implementation: http://www.raymondcamden.com/2014/9/25/IndexedDB-on-iOS-8--Broken-Bad
Do you know if there is anything you could do to prevent iOS8 from using indexedDB, until this problem is resolved ?

@thgreasi
localForage member

You can probably somehow detect the browser and use setDriver, as found in the docs.

@thgreasi
localForage member

Oops half post...
... But I'm not aware of any iOS 8 browser detection script yet that's also considered production ready.

@tofumatt
localForage member
@tofumatt
localForage member
@ocombe

Since it's the first and only iOS with indexedDB, the user agent test should be pretty easy (just prevent all iOS from using indexedDB ?)

@tofumatt
localForage member

Right, but I'd prefer not to do that, as things like Cordova/PhoneGap might not report the right UA but have access to a WebKit with IndexedDB. We'll only use UA if there's no other way.

@ocombe

Oh yes, you're right, I didn't think of that :)

@thgreasi
localForage member

A nice thing to discover on Friday...

@nolanlawson

We wrote an isolated test you can use to detect the broken functionality in iOS 8 and Safari 7.1. It detects the issue with being unable to open two object stores at once, although not the issue of keys overwriting each other.

Unfortunately in PouchDB we just fell back to user agent sniffing, because we needed a synchronous test rather than an async one.

@tofumatt
localForage member
@nolanlawson

Yeah. FWIW we use

var isSafari = typeof openDatabase !== 'undefined' &&
    /Safari/.test(navigator.userAgent) &&
    !/Chrome/.test(navigator.userAgent)

That openDatabase test is because IE Mobile now masquerades as Safari in their user agent.

@tofumatt tofumatt closed this in 664667c Oct 9, 2014
@vrutberg

Has anyone been able to test this on iOS 8.1 yet? I am experiencing these problems as well, but haven't been able to test in iOS 8.1 so far.

@tofumatt
localForage member
@nolanlawson

same, seems it's not fixed on 8.1

@nolanlawson nolanlawson added a commit to nolanlawson/caniuse that referenced this issue Dec 1, 2014
@nolanlawson nolanlawson Safari 7.1+ IndexedDB is equally buggy as iOS 8+
In PouchDB we found Safari 7.1 and 8 to have the same issues cited in the article about iOS 8. For more details:

* pouchdb/pouchdb#2533
* yathit/ydn-db#20
* localForage/localForage#254
5137d67
@CoIin

Has anything change here recently? If I'm using Mac OS 10.11, or iOS 9.3.1, do I have to live with the workaround from 16 months ago?

@bradennapier

Appears to still not work - localforage on ios = breaks entire page

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