Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation appVersion shows versionName instead of versionCode #902

Closed
mtrezza opened this issue Oct 25, 2018 · 6 comments · Fixed by #1032
Closed

Installation appVersion shows versionName instead of versionCode #902

mtrezza opened this issue Oct 25, 2018 · 6 comments · Fixed by #1032

Comments

@mtrezza
Copy link
Member

mtrezza commented Oct 25, 2018

Issue:
The Android SDK sets the app's versionName (e.g. 2.0) instead of its versionCode (e.g. build 200) in the Installation field appVersion.

Expected:
The build number (i.e. versionCode) should be set.

Rationale:
It makes sense to set the version code, because:

  • server logic that is dependent on the build number can easily compare the versionCode being an integer, instead of versionName being a String.
  • a build number more accurately identifies an app package than a version code.
  • it contradicts the Parse iOS SDK which sets the app build number

However, correcting this inconsistency would be a breaking change for existing server logic.
Note: The API request header contains both, the build number and version name.

Affected Code:

String appVersion = pkgInfo.versionName;

String appVersion = pkgInfo.versionName;

@Jawnnypoo
Copy link
Member

Hmm. Any thoughts on what to do here @flovilmart ?

@flovilmart
Copy link
Contributor

Uhm, that’s indeed problematic as it’s been a while. Can we feature flag it so it’s picked at initialization time by the developer?

@mtrezza
Copy link
Member Author

mtrezza commented Oct 25, 2018

I like the feature flag idea. It should be also a feature in the iOS SDK then.

@flovilmart
Copy link
Contributor

Good idea

@mtrezza
Copy link
Member Author

mtrezza commented Jun 3, 2019

I suggest tagging this as up for grabs, good first PR.

@mtrezza
Copy link
Member Author

mtrezza commented Jun 10, 2020

I'm going for just correcting the appVersion to be the build number for now. Otherwise there is an inconsistency with the Parse iOS SDK. This is a breaking change, but it's actually an overdue correction.

If we introduce a switch for the developer as to what appVersion means, we just create issues down the road because there we have 1 DB field that can be populated with 2 different properties. A better approach to me is to finally fix this bug, and if this is really a stopper for someone, then they can open a PR and add an additional column to the Installation collection for the "marketing version name".

@rogerhu can you take a look at this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants