Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to test Windows Phone 8 app update, migrate IsolatedStorageSettings

I have completely rewritten one of my Windows phone 8 app. I use IsolatedStorageSettings to store user specified settings in both "old" and "new" versions of my app. In my new app version I just convert the old settings structure to new one.

Now I want to test the app update case. So far I have tried the following.

  • Build "old" and "new" xap files using VS (same app id and publisher id).
  • Install the old xap using WP Power Tools
  • Save some settings in app, check using WP Power Tools that the settings are saved to __ApplicationSettings
  • Update the app xap file using WP Power Tools
  • Check that the __ApplicationSettings is still there with "old" data
  • Launch the new app, __ApplicationSettings is now empty and all old data has gone.

What im doing wrong? Ho should I test the app update case, and how to keep the old __ApplicationSettings in place?

Is there some id's (?) which are now different in my old and new app and the platform thinks that the old __ApplicationSettings does not belong to new version and deletes it? Im using completely new namespace in my new app.

UPDATE

Im still struggling with this issue, how how to keep old isolated storage settings (__ApplicationSettings). In the file itself there is references to my app namespace. For example I have saved collection of MyCollectionItem's, in the __ApplicationSettings I find line:

System.Collections.Generic.List`1[[MyOldApp.MyModels.MyCollectionItem, MyOldApp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=xxxxxxxxx

Now as my new app uses completely new namespace, this is not working?

Also I noticed that when I first time save something to IsolatedStorageSettings with my new app, the old settings (__ApplicationSettings) are erased.

Any idea how to migrage the IsolatedStorageSettings from old app to new one, as basically my new app is completely new app.

like image 578
devha Avatar asked Aug 18 '14 19:08

devha


1 Answers

Theres two part to this question,

  1. Using persistent storage like IsolatedStorage to share data between two versions.
  2. testing the versions upgrade keeping data.

This might help you with 2nd part,

  1. submit a Beta version of your older app.
  2. install it and add data > will be stored in isolated Storage
  3. submit a beta for new version, while submitting choose Add New, DO NOT replace.
  4. you will get notification on mobile that the new version is available, choose to upgrade.
  5. after installation, you should see your data.

lengthy process, but worked for me. hope it helps

like image 162
Nishchith Uchil Avatar answered Nov 07 '22 06:11

Nishchith Uchil