I know, it is not directly related to Ionic, but as there are a lot of mobile developers around, I would like to see if someone has similar issues at the moment.
Our app is using IndexedDB to store certain data. Since the latest iOS update (14.6), we experience big issues in accessing this database. When the app starts (both the native package, and the website in Safari browser), the app is not able to open the database. The call simply does not come back, no onerror, onsuccess or similar callback is called.
I would suggest using Ionic Storage here. Its initialization code ensures that things are ready to be interacted with before trying to do so. Or, if you don’t want to do that, you could at least look at its source and do what it does.
I am not sure if the suggestion of @rapropos helps. I am using that one with Indexdb as driver, as per documentation.
I am not sure if I want to revert to localstorage instead of indexDB.
Biggest issue is instability.
btw, earlier I had similar issues, which were somehow related to me using firebase and its oauth stuff - that one also uses indexdb under the hood to persist stuff across redirect logins and such. Somehow I got that fixed to reduce the number of writes to storage - refactoring a large chunk of the code. iOS PWA Firebase and Storage blocks - can't find issue
And on a separate note, I noticed when the PWA has an unhandled exception, Safari freaks out really easily.
I believe, but have not proven, that in iOS 14.6 the indexedDB engine is now lazy loaded and there is a bug in that initialisation code. I THINK to workaround this there needs to be a delay between first accessing the window.indexedDB property (which triggers the lazy initialisation) and calling window.indexedDB.open(…).