Esri / offline-editor-js

ArcGIS JavaScript library for handling offline editing and tiling.
http://esri.github.io/offline-editor-js/demo/
Apache License 2.0
159 stars 142 forks source link

IndexedDB on iOS 8.1 #290

Closed robkspeer closed 9 years ago

robkspeer commented 9 years ago

So it looks like iOS 8.1.3 supports IndexedDB without the shim. Meanwhile, the current version of the shim doesn't appear to support iOS 8.1.3.

It doesn't appear to be related to the known primary key issue, because you're using unique tile urls as the key.

I would dig in but it's proving tricky without having a Mac that I can run Web Inspector from. I'll try to check out weinre and see if I can console from iOS with that.

andygup commented 9 years ago

@robkspeer thanks for the udpate. I'm in the middle of working on offline-editor-js v2.5 otherwise I'd take a look. Let me know what you find out. iOS 8 in general seems to have messed up quite a few things.

I've been watching the conversation on that issue thread.

robkspeer commented 9 years ago

@andygup I decided to move ahead with localForage. in my fork I edited appcache-tiles-advanced-src.js to use localForage and it seems good to go on iOS in my testing and using your appcache-tiles.html sample after including localforage.min.js. I'm forcing Safari and iOS to use WebSQL databases thru localForage, rejecting IE completely because it doesn't seem to support Web SQL or IndexedDB fully, and all other browsers are verified and then goes thru localForage for their indexedDB. it's a side fix for now until the shim can be reapplied. (or Safari catches up one day).

andygup commented 9 years ago

Good deal, nice work around.

There 'may' be a fix already for indexeddbshim: https://github.com/alekseykulikov/treo/pull/21. I'll look into and test it after v2.5 release if someone else doesn't get to it first.

robkspeer commented 9 years ago

I didn't have much luck with that one, but it seems like the shim folks are on it

On Feb 23, 2015, at 8:03 AM, Andy notifications@github.com wrote:

Good deal, nice work around.

There 'may' be a fix already for indexeddbshim: alekseykulikov/treo#21. I'll look into and test it after v2.5 release if someone else doesn't get to it first.

— Reply to this email directly or view it on GitHub.

andygup commented 9 years ago

Just for reference and FYI, here's sqlite ported to JS. I'll be interested in its performance characteristics since it's not a native Browser API.

https://github.com/kripken/sql.js/

andygup commented 9 years ago

Quick update: the library seems to be working okay with iOS 8.3 and IndexedDB. I ran a few tests with the library on an iPad and I'm happy to report that an IndexedDB database was successfully created, and it populated with tiles and retrieved tiles with no issues. These were proof-of-concept tests and by no means where they exhaustive.

So for now I'm going to go ahead and close this issue for iOS 8.3 and Safari.

image