Ionic app does not remove local data after uninstalling

Viewed 678

I have found a solution for Android but not able to get one for iOS.

  • I logged into my app
  • Perform some tasks that save data in local storage
  • Go to Home and uninstall the app
  • Install App again
  • All previously stored data reappear

It should remove all data upon uninstallation.

1 Answers

If you are using Cordova, add the following in your config.xml-

For iOS

Inside <platform name="ios">-

<preference name="BackupWebStorage" value="none" />

Default value is cloud. https://cordova.apache.org/docs/en/latest/config_ref/index.html

For Android

Inside <platform name="android">-

<edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application">
    <application android:allowBackup="false" android:fullBackupContent="false" />
</edit-config>
Related