TIMOB-23572 implemented Ti.App.Properties.removeAllProperties() for iOS/Android, it should also be implemented for Windows too. Demo code below
// Check the initial properties (should only be the iOS ones)
Ti.API.warn(Ti.App.Properties.listProperties());
// Add all possible property-types (bool, int, double, string, object & list)
Ti.App.Properties.setBool("testBool", true)
Ti.API.warn(Ti.App.Properties.getBool("testBool"));
Ti.App.Properties.setInt("testInt", 1337)
Ti.API.warn(Ti.App.Properties.getInt("testInt", 1337));
Ti.App.Properties.setDouble("testDouble", 13.37);
Ti.API.warn(Ti.App.Properties.getDouble("testDouble", 13.37));
Ti.App.Properties.setString("testString", "john_doe")
Ti.API.warn(Ti.App.Properties.getString("testString", "john_doe"));
Ti.App.Properties.setObject("testObject", {appc: "rocks"})
Ti.API.warn(Ti.App.Properties.getObject("testObject", {appc: "rocks"}));
Ti.App.Properties.setList("testList", ["appc", "rocks"])
Ti.API.warn(Ti.App.Properties.getList("testList", ["appc", "rocks"]));
// Check the properties again. It should now include the keys of the custom properties
Ti.API.warn(Ti.App.Properties.listProperties());
// Remove all custom properties
Ti.API.warn(Ti.App.Properties.removeAllProperties());
// Check the properties a last time. The custom properties should not be included anymore
Ti.API.warn(Ti.App.Properties.listProperties());
https://github.com/appcelerator/titanium_mobile_windows/pull/890
Verified improvement with the code provided in the description;
.removeAllProperties()
showed no properties. *Environment*Closing ticket.