Closed Lunatic83 closed 8 years ago
@Lunatic83 unfortunately your fix does not work for me with Safari 7.1.6 on OSX. Can you confirm if it works on the latest iOS 8.3? As far as I read here (http://www.raymondcamden.com/2014/9/25/IndexedDB-on-iOS-8--Broken-Bad), indexedDB is still not working correctly on the latest iOS. Additionally I face the same issue as in #15 described.
According to the hint in the indexedDB shim readme, the variable window.indexedDB
is also read-only. So you can't even overwrite it (https://github.com/axemclion/IndexedDBShim#known-issues). I think the most flexible solution would be to offer a method in the indexedDBProvider to overwrite the indexedDB variable. In this way you can choose when and with which shim you want to use.
@mmmichl That's not really a big deal as there is a closure variable 'indexedDB` which the library uses at instantiation to determine the correct indexedDB global to use.
@Lunatic83 what's needed here is a harness which can run the karma testing in the xcode safari emulator browser if that's possible. The functionality needs to be confirmable by testing so that we can confidently say that this library works with shimIndexedDB.
@bramski unfortunately this is not working in the case of Safari and Safari mobile. The latest version of Safari has an indexedDB implementation, and thus it will use that. But the implementation is so broken, that even after spending couple of hours I couldn't make the tests work. There are different, very strange behaviours. Like not being able to delete a database at all after a certain time, or even getting a upgradeneeded
event when deleting a database?!
I don't know a automatic way, but to manually run the tests in a simulator or on a real device my approach was:
singleRun: false
so it does not terminate at the end of the testshttp://[your ip]:8080
The tests will run immediately.
LOL. Yeah that sounds amazingly broken. There's another PR here about doing safari support, so I imagine that is quite busted as well.
But I thought this PR was about using shimIndexedDB, not the native safari indexedDB? Shim uses webSQL; so my assumption would be that if @Lunatic83 fixes this code and runs the cordova emu browser that this PR should be verifiable.
Hi,
I have to do the same patch on my side, but it should be great to merge the shimIndexedDB fix ; on iOS 8.3, mobile app, it's necessary.
Can you do this ?
thanks !
@wibimaster someone needs to actually do the work of running this in emu and submitting a proper PR to make this work. If you fork and make a proper PR then I'll definitely merge it. This particular PR is very broken.
@bramski Allright, I'll do a fork and a PR for that ; I never used the xcode safari emulator, but I directly test it on a real iPhone device (4S, iOS 8.3) :)
Done here : #58 Is it OK for you ?
Thanks !
Much better. Closing this.
I'm using your angularjs indexeddb module for iOS support I had to fix putting the following code into angular-indexed-db.js on line 15
indexedDB = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB || window.shimIndexedDB;