'Storage not being cleared when uninstalling Capacitor App (iOS)

I've made a cross-platform app using Ionic and Capacitor but when the user uninstalls the app on iOS and re-downloads the saved data is still available, rather than it being a fresh open.

I've found this solution for Cordova Ionic app does not remove local data after uninstalling

But I cannot find the equivalent for Capacitor as Capacitor moved away from Cordovas config.xml https://capacitorjs.com/docs/basics/configuring-your-app



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source