Type Function Library system.* Return value Boolean Revision 2017.3060 Keywords system preference, deletePreferences See also system.getPreference() system.setPreferences()
Deletes preferences from storage.
Returns true
if all of the given preferences were successfully deleted and no longer exist in storage. If a requested preference did not already exist in storage, it's still regarded as successfully deleted.
Returns false
if at least one of the given preferences failed to be deleted from storage.
This function is a blocking call and it won't return a result until all of the given preferences have been deleted from storage. As a result, this function may cause performance issues and it should not be called frequently, during active gameplay, or in a UI object's listener function. For best performance, it's best to delete multiple preferences via a single call after leaving a scene or during an "applicationExit"
system event.
On Windows Phone, this function will always return false
because the "app"
category is not supported. That means custom application preferences cannot be stored on the Windows Phone platform.
system.deletePreferences( category, preferenceNames )
String. Indicates which set of preferences should be accessed on the system. Currently, only the "app"
category is supported — this is the application's custom preferences defined by the Corona app developer.
-- Write this app's custom preferences to storage local appPreferences = { myBoolean = true, myNumber = 123.45, myString = "Hello World" } system.setPreferences( "app", appPreferences ) -- Sometime later, delete the preferences that were written to storage system.deletePreferences( "app", { "myBoolean", "myNumber", "myString" } )