App Reset SDK

Reset your app to its initial state.

Written By despia

Last updated About 1 year ago

Important

This SDK provides a clean slate for users by:

  • Clearing local data

  • Resetting app settings

  • Removing cached content

  • Returning to default state

  • Improving troubleshooting

SDK Usage

// Reset app to default state
window.despia = "reset://"

Examples

Simple Reset

function resetApp() {
    // Warn user first
    if (confirm("Reset app? This cannot be undone.")) {
        window.despia = "reset://"
    }
}

Reset with Reload

function resetAndReload() {
    window.despia = "reset://"
    // Give time for reset
    setTimeout(() => {
        window.location.reload()
    }, 1000)
}

Troubleshoot Reset

function troubleshootApp() {
    // Clear app state
    window.despia = "reset://"
    
    // Redirect to setup
    window.location.href = "/setup"
}

Tips

  • Always warn users before reset

  • Explain what will be cleared

  • Allow cancellation option

  • Plan for after-reset flow

  • Test reset scenarios


Need help? Email us at support@despia.com