-
-
Notifications
You must be signed in to change notification settings - Fork 650
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
Dexie.js not working in "Chrome and Opera for iOS" #110
Comments
Chrome and Opera do not support IndexedDB in iOS8: |
Ok, thanks for that important information. I suppose there's nothing we could do about it though? ;( |
I don't think so. |
Unless the iOS web browser control lacks indexedDB even though Safari has it. Does YDN-DB work without the indexedDB shim for WebSQL or does it include it first? When Dexie throws "...IndexedDB API not found", it means it didnt find any of the following:
So where is indexedDB in that case? Could it be that YDN-DB works with the IDB-shim only? If so, could you test to include the shim before including Dexie? |
Using the latest IDB-shim before dexie.js does work in a simple test. |
Ok, nice. Suppose the shim must be included as a plain script tag but Dexie should pick it up even though included as a commonJS module. Haven't tested that so please tell me if it works or not. |
looks like it's not so easy... probably the shim as some issues... including the shim breaks now the function of Firefox... I'll come back to you if I have a version that works... |
So, it's working with the following implementation tested in "Chrome, Safari, Opera (all iOS 8.1), Firefox, IE 11, Chrome (all Win 7), Firefox, Chrome, Safari (latest Mac OS X)". Android should also work, but I have no such devices... What have I done:
Hope this helps. Probably you're able to optimize this behavior in dexie... |
Thanks for reporting how you found your way to fix this. I still don't see how this could be optimized within dexie. From what I understand, the issue is on IOS devices that lacks indexedDB support. What would dexie be supposed to do then? Please explain your idea of what dexie could do here to simplify/optimize this. Do you suggest dexie should bundle the shim so that it works "out of the box" without having to include the shim in a script tag? |
Good question. Indexeddb is supported in iOS 8+, but seems to be faulty. You'll find the master bugs here: https://gist.github.com/nolanlawson/08eb857c6b17a30c1b26 |
The worst issues with indexedDB on Safari 8 (web browser) has already been worked around in Dexie (onupgradeneeded error and no support for multiple object stores). This has been verified to work with Safari 8 and Dexie as long as you only use a single object store per transaction. So I suppose the issues you detected is specific to chrome / opera on IOS. Sine I don't have access to any IOS device I can't see what's happening. You helped me and pointed out that Dexie claims "indexedDB API not found" which indicates that the indexedDB API is actually missing for those browsers on IOS. Maybe they use an earlier version of the Web browser component that lacks indexedDB support, and in that case, the only thing to do is to wait for a newer version of chrome for IOS, and in the meantime use the WebSQL polyfill? |
Currently we are working on the implementation of our web app and so far it's working with the workaround descripted above. If we'll found more issues, we'll come back to you and open a new issue on the Dexie Git. |
@mtblabs Could you clarify whether you use |
Working normally on Mac Safari 11.1 |
I tested this in iOS 8.
Dexie is working in Safari for iOS 8.
The text was updated successfully, but these errors were encountered: