BB10 Android App updates clearing user data - blackberry-10

I am porting an Android app for BlackBerry and during tests I see my saved user data (properties and a list of activities) disapearing each time I upload my newly build BAR to the device.
Will this happen on every update of the app?
On Android, my local data stays permanently on uploading and installing new versions.
I do not want to use shared storage for this data to avoid too many permissions, since the user won't understand why I need this shared storage (user could wonder about if I want to steal his other data).

This seems to be an issue of the Android VM version used at that specific time. In the meantime, the behaviour is as one would expect it, and all user data stays even after app update.

Related

What happens for hive local database in flutter after updating app in app store?

I'm new i flutter. I'm developing an offline money management app. I used hive as local database of my app for storing data locally. I have one important question: if I release new update after publishing my app in the app store,
what happens for hive local database in flutter after update? Does my users will lost their registered data or not?
Updating the app does not change or delete it's data on a device.
However, you are responsible to ensure the new version of the app can read and update the database successfully if you add or remove fields, type, tables, etc.
The is best ensured by suitable test cases that can be run before each release.

How to set Application.version for desktop builds in Unity

I am trying to make a system for checking version numbers of an application and prompting for updates, I would like to use Application.version for this.
Unfortunately I'm having some difficulty finding out where the version is set or where unity acquires the number from, at least on desktop platforms.
Has anyone had any success with setting version number in the editor or is this a post build step?
This is more likely to be handled by the store, it will show in the update section when a new version is released.
If you need to inform in game, then you would have a value stored in the app and a value stored on a server, compare those, if not the same, you put a banner with a link to the app store page of your app.

How to update iOS app with exception of a file

I'm making my first iOS app. And I have a question.In my app I want to save the current state of the app: levels completed, score reached, money, in-App purchases, etc. in a Settings.plist. The problem is, how can I place this plist so that if the user updates the app, he/she not to lose these settings. I read about The app sandbox, but I don't understand
how it works, and how can I manage that from Xcode.
You should store these settings in the NSUserDefaults. They are kept when new app versions are installed, so you won't have any problems.
Two points:
a) When you update your app after its in the app store by submitting a new version of the same app the files created by the old version will not be lost. So you can store whatever you like in the app's Document or Library directories and expect it to still be there after an update. The Library/Caches directory will not be backed up or restored by iTunes so don't put anything there that you can't re-create. If you submit a different version of the app (not an update but a new app, so you have two separate apps in the app store, perhaps free and paid) there is no way that I know of for the new version to get to the files that the first version created.
b) It's easy for the user to read, delete, or change whatever files you create in Documents/ or Library/. It can be done with an app on his/her Mac such as iExplorer (downloadable from macroplant.com). So be aware that if the file is human-readable, which a .plist file is, the user can change it to improve his/her score, get more consumables, or whatever. You can prevent that by encrypting the data, or somehow obscuring the meaning, or by some kind of checksum scheme so you can at least detect that it was changed. Any of those measures involve complications of course and may not be worth the trouble.
BTW... if you're developing an app that uses data files iExplorer is a great debugging tool. I have no vested interest in it except that I've learned how to use it and want it to continue to be supported. There are probably other apps that do the same thing but this one works great and is fast and easy to use.

Re-Installing IPhone App From Inside The App

I want to find a way if it's possible to re-install an IPhone app from inside it?
Let's say my users have the app already installed in their phones and now new version is released, can I make my app such that it will check over internet if new version is available and if it is, download it and ask the user to install it. If user says yes, it will first un-install the current version and will install downloaded version.
Is it possible anyhow?
Apple wont allow this.
For one reason, un-installing the app removes all the user documents (if applicable), so theres no way to preserve user data.
Apple already has a medium for updating (iTunes App Store).
If you want to be able to check if there is a newer version of your app, you can do that simply by checking a text file (for example) on your server, and notifying (by UIAlertView possibly) the user that there is a newer version of your app. But again, Apple already has a standard system in place. (Badges on the App Store icon)
probably not because to uninstall an app it requires the app to be closed
You don't have to do that. If you upload a new version to the app store, a notification badge will appear on the app store icon on your users' phones. You aren't allowed to install apps any other way than through the app store, anyway.
It depends on your app and what you want to update. It's not possible to reinstall the native app, but you can download data and update your app using that data. For example, we have an app in the store which is mainly a webview inside the native app. The first time it launches, it uses the internal data, but checks our server if there is an update. If there is an update, it downloads remote data and replaces the internal. It's what most magazines do for updating their libraries.

Is device deployment enough to simulate application update?

The application update process via app store (on the device by a lambda user) is not very well documented. I've sum up all this to these questions :
what happens when the user updates his app? Is everything erased, or just some part of the app?
so what is kept, what is not kept?
how to test the application update in a development environment ?
when user updates an app, Documents folder is stored as is, including NSUserDefaults (but, sometimes user download app via iTunes and replace the whole application, crying 'OMG! update killed all my levels progress!');
Application bundle is erased and replaced by new one (anyway, it is readonly for user);
Re-deployment of new build version will be enough;