Keeping user data after upgrating a Windows Phone application - windows-phone

I have a Windows Phone application which needs to save some user data/settings in a xml file BUT when I upgrade and install a new version of this application, the data are destroyed and reset.
How can I preserve data/settings in a xml format when upgrading my application (for one version to a newer)?

According to MSDN,
Updating apps and isolated storage
When you update your app, any data in the isolated storage is preserved. However, data in the isolated storage is deleted if the user uninstalls and then reinstalls your app. For more information, see Data for Windows Phone 8.
Are you rebuilding the project every time before debugging? That will remove and install the app freshly. Try publishing the app on store in beta and update it. That should preserve app data.

Related

Can I install my own Windows Phone App on a real device without uploading the app to Store?

I'm new to windows phone, and I don't have a real device to test on.
I know that one can install .XAP files from SD card.. but does this process reqires internet access to check that the app is on the store or I just installs it as in Android?
Thanks in advance
You can debug your app on your physical device in Visual Studio. Your device has to be connected via usb cabel to your computer and has to be developer unlocked. You can developer unlock your phone with the Windows Phone Developer Registration Tool, which is a part of the Windows Phone SDK. You can find more information about the process here.
No, you cannot install the xap package on other people devices until unless their phones are not developer unlocked. When you build a .xap package in Release mode, you need to first upload it to Store where the Microsoft team checks package for security concerns. Once that has been checked, package verified, then the packages can be installed, basically uploading the app.
To debug the app, its better to unlock your friend's phone and then test it on it. After that if you wish you can also un-register the phone to revert back to original developer locked mode.
There is one more method which I use when my app is completed but do not wish to release the app on store, but instead, I wish that first these apps be used by my friends first, they give feedback and after that I finally submit the app on Store.
To do this, I submit the app in private visibility on Store. There is an option while submitting the app which indicates whether you want that other users can see your app on phone. I mark it Hidden. Once my app is verified and is on store, I download the app from store by going to the appropriate link of app on store which is given in app profile at dev-center. I choose 'Download and Install Manually' option to download the xap. This xap can be installed on other devices without unlocking their device.

Access isolated storage on an app that isn't mine

Trying to access the isolated storage for an mp3 downloader app on my Windows Phone 8.1 Dev Preview. For CLI, I used the ISETool.exe that is included with the Windows Phone SDK. Because I don't have the app's Product ID, I couldn't copy it's storage. I think I got the product ID from the windowsphone.com store, but there's nothing to verify it against. Additionally, I tried using the IsoStoreSpy tool, which won't list the app, it only lists my apps that I have created.
Anybody have input as to copying the isolated storage of an app I got from the store?
Edit: Device is dev unlocked
You can only get files from side-loaded apps (eg, ones you deploy from VS). You can't extract files from Store-delivered apps.

IBM Worklight: Upload application to Worklight Server / App Store

With Direct Update, the mobile application can be automatically update with a new version of the web resources. In order to update the native resource, a new version of application must be uploaded to application store.
Consider the case that I have an update for my Worklight app with both native and web resources code update which has already been in application store.
Questions:
Is the following a correct way to update the app?
Step 1. Package the app in .ipa / .apk (with native + web code) and submit to application store
Step 2. Deploy an updated .wlapp file (with web code) to Worklight Server.
In application store, I can specify the application version when uploading the application. Will the application version be incremented automatically once I deploy the .wlapp to Worklight Server?
If the user does not update his application in application store and open the application, since there is a new web resource update in Worklight Server, it means that there will be a direct update alert box to prompt the user to download the latest application and in this case only web resource will be downloaded. There are some problems when the native code and web code are correlated?
Thanks a lot.
This would essentially be the correct order of steps, yes.
However, since you say you're updating both the native and web resources, I would make sure that the existing app can work with just the web resources update (without updating the native), because once deploying the .wlapp to the Worklight Server, existing users will receive a Direct Update.
If this scenario is not one you want to support, then in application-descriptor.xml you should also up the value of the version=" " attribute in the environment's element. When building the app after doing so, this will create a new .wlapp (for example: myProjectNameMyAppName-1.1.wlapp instead of ...-1.0.wlapp).
This means that the existing 1.0 users will not receive any Direct Updates, unless you deploy an updated ...-1.0.wlapp to the Worklight Server.
In relation to the above, no, the application version is not incremented automatically, it is something you need to control manually.
Also, I don't think the version value is something you control in the application store interface...
IFAIK the application version is changeable in Xcode prior to creating the .ipa for iOS and in AndroidManifest.xml prior to generating the .apk for Android (and in similar fashion for other environments).
EDIT: Actually... I think that changing the version value in application-descriptor.xml will also up the application's version number. Need to look at the end result (in AndroidManifest.xml or the Xcode project, in Xcode).
This would really depend on the behavior of your application and how resilient you've written it to be in the face of updates. I have slightly covered this in #1 above.
Other than talking about it theoretically I would suggest taking the jump actually upload an app to an application store, and test it privately, of course. This would be the most convenient to do using Google Play where publishing an app is near-instant.

metro-style apps update behavior

Which ways users can update Windows 8 metro-style apps installed on machine, considering a existing new version on Store?
Apps that uses ApplicationData.Current.LocalSettings to save some user data, when the app is updated, this settings are removed/reset or saved between versions?
And what is the behavior of LocalSettings when user uninstalls and reinstalls the app manually?
The settings are persisted between versions.
The LocalSettings are removed when the user uninstalls the app.

How to test my offline content based app is working fine after restoring the backup from Apple iCloud?

I have created a offline content based app[new app not available in app store yet] and i am storing all the contents inside cache folder as per iOS Data storage guidelines. None of content will be backed up during iCloud backup for any user. In a ideal scenario If the user does a restore of his device using iCloud backup, my app will installed from app store automatically after successful restore operation.But now my app will not have any contents already downloaded and was used by user so i need to download everything again.
The problem is how to simulate this scenario because after i do restore from iCloud my device tries to connect to app store and install the app. Since this is a new app and i haven't posted it in app store yet so app doesn't get installed after restore operation and i couldn't test my app after iCloud backup.
Is there a better way to simulate testing scenario?
Did you try to restore then install your app manually (from iTunes)? I think iOS restore uses a "safe place" for app restored data and keep it there for some time until the app is effectively installed.