Adding versioning to future proof the app
It's typical that you don't think about keeping track of the app version for a particular user. However, as the app grows in the number of users as well as releases, you will soon face the problem of update issues and incompatibilities. For example, a user may run an old version of your app but all your backend APIs are now expecting new parameters from a newer app version. Therefore, you may want to think about a strategy to detect the app version locally in order to notify the users for an update requirement. This is also helpful if your backend processes differently for a specific app version.
The app you are going to build is very simple. It will detect the current version and store the information in a service. This is the screenshot of the app:
Getting ready
This app example must run on a physical device or a simulator.
How to do it...
Observe the following instructions:
Create a new
MyAppVersion
app using theblank
template, as follows, and go to...