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

iOS8 & indexedDB #254

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

iOS8 & indexedDB #254

ocombe opened this issue Sep 26, 2014 · 17 comments

Comments

@ocombe
Copy link
Contributor

ocombe commented Sep 26, 2014

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
Copy link
Member

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

@thgreasi
Copy link
Member

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

@tofumatt
Copy link
Member

Definitely a bummer! Feature testing is obviously preferred, I'll look through to see if there's something they do that we can test against other than just a User Agent.

  • Matt

On Sep 26, 2014, at 12:35, Olivier Combe notifications@github.com wrote:

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 ?


Reply to this email directly or view it on GitHub.

@tofumatt
Copy link
Member

If IndexedDB is too broken to use I'll leave WebSQL as the default driver for iOS 8.

  • Matt

On Sep 26, 2014, at 12:39, Thodoris Greasidis notifications@github.com wrote:

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


Reply to this email directly or view it on GitHub.

@ocombe
Copy link
Contributor Author

ocombe commented Sep 26, 2014

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
Copy link
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
Copy link
Contributor Author

ocombe commented Sep 26, 2014

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

@thgreasi
Copy link
Member

A nice thing to discover on Friday...

@nolanlawson
Copy link
Contributor

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
Copy link
Member

Oh, nice. I think we can manage an async test, though I wonder if UA sniffing is much faster...

tofumatt (Sent from mobile)

On 30 September 2014 10:41:04 GMT-04:00, Nolan Lawson notifications@github.com wrote:

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.


Reply to this email directly or view it on GitHub:
#254 (comment)

@nolanlawson
Copy link
Contributor

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 added a commit that referenced this issue Oct 9, 2014
Don't use IndexedDB in iOS 8 (fix #254)
@vrutberg
Copy link

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
Copy link
Member

I don't have a phone I can use to test 8.1 on yet, but if it gets fixed in 8.1 I'll surely adjust so it uses indexeddb on 8.1

tofumatt (Sent from mobile)

On 16 October 2014 16:56:21 GMT-04:00, Viktor Rutberg notifications@github.com wrote:

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.


Reply to this email directly or view it on GitHub:
#254 (comment)

@MauriceSchoenmakers
Copy link

according to http://bl.ocks.org/nolanlawson/raw/c83e9039edf2278047e9/ and my iphone, not fixed on 8.1

@nolanlawson
Copy link
Contributor

same, seems it's not fixed on 8.1

@CoIin
Copy link

CoIin commented Apr 20, 2016

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
Copy link

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants