Whenever you make changes and redeploy the app, data that were created previously by the app will be lost. To make changes in the app without losing the data, you need to upgrade the app.
Let us see how to upgrade the app:
- Open AppManifest.xml and increment the version number by 1 whenever a change is made
- In my case, version is 18.104.22.168. Hence I am changing it to 22.214.171.124 and publishing the app as shown below:
- Click on Finish in Publish summary.
- Explorer window opens as depicted below:
- Copy the location of the file and go to the developer site
- You can see the list of apps in App Testing. Select the app and click on upgrade an app
- Click on Upload and browse the file from copied location
- Click on Upgrade
- You can see the upgrade progress as shown below:
- Once upgraded, the version is changed to 126.96.36.199 and if you check for the previous data, it actually exists.