nolanlawson / fruitdown

Browser-based LevelDOWN adapter that works over Apple IndexedDB (UNMAINTAINED)
MIT License
50 stars 4 forks source link

does not work on homescreen apps? #8

Closed ssured closed 8 years ago

ssured commented 8 years ago

I did some research and figured out that fruitdown does not work in sites pinned on the iOS homescreen.

On iOS 9.2.1 it seems when starting a page from the homescreen it does not have indexedDB available while in Safari it had indexedDB available. Maybe Safari runs WKWebView and a homescreen app runs the older UIWebView?

I wanted to PR this into the readme of this repo, but this finding is so strange I'd like to have it double checked first. indexedDB on iOS is so weird...

In the end homescreen apps (which have navigator.standalone === true) now run on plain old websql for me.

nolanlawson commented 8 years ago

Can you file this bug on WebKit with a reproducible test case? I don't have an iOS device handy, and so I cannot confirm.

ssured commented 8 years ago

I researched some options and there is quite good news here. It seems storage limits on iOS have changed. Using http://demo.agektmr.com/storage/ we can build this matrix:

iPad Air iOS 9.3.2 IndexedDB WebSQL
Safari browser infinite (Fruitdown) 50mb (using size:50)
Web clip app not available app crashes at 500mb

I'll update the PouchDB FAQ and close this issue

nolanlawson commented 8 years ago

My hunch is that home screen apps use UIWebView rather than regular Safari, hence IndexedDB is missing.