How to disable Store Files On This Device alert in browser (Ionic 3 PWA)


#1

Hey Guys,

When I tried to run my ionic 3 pwa in broswer (i tried with Chrome, Safari, Firefox in Mac OS and Windows), the message Store files on this device was prompted. Is there anyway to hide it? There SQLite database is
created in the app.component.ts. I’m not a web expert, so I’m afraid if it’s right to ask that kind of question here. I compiled that website with ionic cordova build browser --prod and I hosted it with SSL.

Thanks in advance for any assistance you can provide.

Save%20files%20on%20this%20device


#2

Then you won’t be using Cordova, correct?

Or perhaps you meant ‘Ionic 3 Hybrid Mobile App’?


#3

Hi @robinyo
yes, it’s ionic 3 hybrid mobile app. It is working well in iOS and Android devices. Only showing that message in browsers.


#4

You can solve this error by removing cordova-plugin-file in browser build (different config.xml for different targets).
Browser build can be found at

platforms/browser/www

Alternately you can comment/remove all entries in cordova_plugins.js file (Found inside the browser build folder as mentioned above) that contain the line:

"pluginId": "cordova-plugin-file"

and the error will go. This solution will work assuming you are not trying to save any local media (audio/images, etc.) on the device.
You may choose to save media on device for native builds and disable that functionality for the browser build.