The story of state: AppData, settings, and the process lifecycle

Play The story of state: AppData, settings, and the process lifecycle

The Discussion

  • User profile image

    There aren't many people on the planet who understand the underpinnings of WinJS better than Kraig. Very informative talk.

  • User profile image

    How does the state managed across app updates/deletes/reinstalls? What stays and what is deleted?

  • User profile image

    Great session Kraig. State a great thread that brings together different API's and considerations. Enjoyed it.

  • User profile image

    Good question, Alex. Local and roaming app state is preserved across app updates. As I discuss in the talk, if you change the version number of the app data (as opposed to the version of the app), you use Windows.Storage.ApplicationData.SetVersionAsync to indicate that. The version applies to local/temp/roaming state as a whole.

    If you uninstall the app, local and temp state is wholly deleted (the folders in appdata for your package are deleted). Roaming state will remain in the cloud for "a reasonable time" so it's still there if you reinstall the app. The time is something like a month, but there's no particular guarantee of the timeframe. But it will be there. This is to accommodate cases where you uninstall the app from a device and then reinstall or install on another device (e.g. you buy a new device, you clean off and sell your other one, then set up the new one).

    Do note that if your roaming state is greater than the quota such that it *hasn't* been roamed, then it gets deleted along with everything else and there won't be present in the cloud.


  • User profile image

    This has to be by far the best session.

Add Your 2 Cents