IonicStorage iOS PWA

I’m trying to get my app working as a PWA. After fixing a few minor configuration issues, I can’t get iOS devices to access local storage. I’ve run

ionic build browser --prod

Uploaded it and Google Chrome (desktop) and Android work perfectly, but the iOS doesn’t work. I get a log error in Sentry

Error: Uncaught (in promise): Error: No available storage method found.
e@https://plap.golf/build/vendor.js:1:912688
invoke@https://plap.golf/build/polyfills.js:3:14981
onInvoke@https://plap.golf/build/vendor.js:1:66734
invoke@https://plap.golf/build/polyfills.js:3:14924
run@https://plap.golf/build/polyfills.js:3:10149
https://plap.golf/build/polyfills.js:3:20245
invokeTask@https://plap.golf/build/polyfills.js:3:15665
onInvokeTask@https://plap.golf/build/vendor.js:1:66652
invokeTask@https://plap.golf/build/polyfills.js:3:15593
runTask@https://plap.golf/build/polyfills.js:3:10844
o@https://plap.golf/build/polyfills.js:3:7901
invokeTask@https://plap.golf/build/polyfills.js:3:16824
p@https://plap.golf/build/polyfills.js:2:27654
v@https://plap.golf/build/polyfills.js:2:27894
at c (/build/polyfills.js:3:19761)
at c (/build/polyfills.js:3:19462)
at None (/build/polyfills.js:3:20234)
at invokeTask (/build/polyfills.js:3:15665)
at onInvokeTask (/build/vendor.js:1:66652)

This is in my app.module.ts file

IonicStorageModule.forRoot({
name: ‘__plapdb’,
driverOrder: [‘indexeddb’, ‘sqlite’, ‘websql’,‘localstorage’]
}),

Any help would be really appreciated.
Mark

Try reverting the order of drivers to:

driverOrder: [‘sqlite’, ‘websql’,‘indexeddb’, ‘localstorage’]

Most likely the issue is caused by indexeddb support with certain versions of iOS.

I am normally “falling” back to websql unfortunately for now when it comes to iOS.

1 Like

Not solved it I’m afraid.