Mahdi N
Mahdi N

Reputation: 2178

Managing app version when publish to google play

I'm about to publish my first app on google play and I'm a little bit lost on how to manage my app version. I have my frontend app written with react native and I have a backend server built with spring boot.

In my backend I have my version number which is incremented on each build release.

My problem is that I don't know how to manage versioning in the react-native part: there's a version tag in package.json and I read here that I should increment versionCode in AndroidManifest file.

To summarize here are my questions:

1/ Should version in my backend, in package.json and in manifest file be always the same ?

2/ Is there a way to force user to update the app when I publish a new update on google play?

3/ When I publish a new version of the app, does users need to download full app size or there's a way to allow them to just download a partial size?

4/ If there's a mismatch between frontend and backend versions, users can perform actions or call some apis that aren't available anymore in my server, how can I prevent this to happen?

I know I asked many questions in one but as I said that's the first time I publish to google play and I wanted to separate my question on 4 parts to be more clear.

Upvotes: 0

Views: 584

Answers (1)

Alexander Hoffmann
Alexander Hoffmann

Reputation: 6014

1/ Should version in my backend, in package.json and in manifest file be always the same ?

No, they can be but practically it doesn't make sense. Your app might need a hot fix or you can implement features which don't require backend changes. The app version can then be changed independently.

2/ Is there a way to force user to update the app when I publish a new update on google play?

There is. You can either do this manually by sending a request to some endpoint at your backend and check if the apps version number is smaller than the version that your API returns. If it is, act accordingly in your app, e.g. show a message or prevent the user from using the app until they update.

Alternatively, you can uses In-app updates from the play-core library.

3/ When I publish a new version of the app, does users need to download full app size or there's a way to allow them to just download a partial size?

The Play store handles this automatically. Allthough I don't know for sure if it's a full redownload or a partial one.

4/ If there's a mismatch between frontend and backend versions, users can perform actions or call some apis that aren't available anymore in my server, how can I prevent this to happen?

To prevent such issues, you should familiarize yourself with the concept of API versioning. In short: If your API update introduces breaking changes, you should create a new version of it at a different endpoint in order to support backwards compatibility. E.g.:

http://api.example.com/v1
http://api.example.com/v2
...

Upvotes: 1

Related Questions