Erase app data on iOS simulator or real devices I am developing natives apps for both Android and iOS and when debugging some login scenarios I need to reset the app to its initial stage without any token persisted on the (virtual) device. On Android, it is just as easy as typing an adb commande adb shell pm clear my.app.package. 

Is there a way on iOS or shall I go through the lengthy process of uninstalling and re-installing the app ?
On iOS, erase all content and settings is how you wipe everything and then push your app again. 

xcrun whatever....


The above xcrun is just useful to install and run an app as opposed to what you want which is to manage settings. See this developer article - at the very end it explains your settings persist even with app removal - so you’d need to clean on the simulator or write your app to reset settings with specific code.

https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/UserDefaults/Preferences/Preferences.html#//apple_ref/doc/uid/10000059i-CH6-SW5

How effective these three options is really depends on your specific code, however. Erase all content always works.