Essentials: AppInfo BuildString incorrect on iOS

Created on 6 Dec 2018  路  9Comments  路  Source: xamarin/Essentials

Description

On iOS AppInfo.BuildString displays Version String and AppInfo.VersionString displays Build String.

Steps to Reproduce

App version is: 1.0.0
Build String is: 4323

var version = $"{AppInfo.VersionString}.{AppInfo.BuildString}";

Expected Behavior

version = 1.0.0.4323

Actual Behavior

version = 4323.1.0.0

Version is displayed properly in Android.

Basic Information

  • Version with issue: Xamarin.Essentials 1.0.0
  • Platform Target Frameworks:

    • iOS: 12.2.1.11

    • Android: 9.1.0.38

VS bug #755386

bug

All 9 comments

On iOS:

  • VersionString is CFBundleShortVersionString
  • BuildString is CFBundleVersion

On iOS shouldn't it be:

  • VersionString = CFBundleVersion
  • BuildString = CFBundleShortVersionString

When the app is uploaded to iTunes Connect it's the CFBundleShortVersionString that becomes the build number.

Ah yes, blarg! Good catch, was a late one. This will impact version tracking as well @mattleibow Let's get this out in a hot fix asap.

Awesome! Thank you!

Actually sorry, we have it correct:

CFBundleShortVersionString gives you the version of your app. It's typically incremented each time you publish your app to the App Store. This is the version that is visible on the "Version" section for the App Store page of your application.

CFBundleVersion gives you the build number which is used for development and testing, namely "technical" purposes. The end user is rarely interested in the build number but during the development you may need to know what's being developed and fixed on each build. This is typically incremented on each iteration of internal release. And you can use continuous integration tools like Jenkins to auto-increment the build number on each build.

See: https://stackoverflow.com/questions/19726988/what-values-should-i-use-for-cfbundleversion-and-cfbundleshortversionstring & apple docs: https://help.apple.com/xcode/mac/current/#/devba7f53ad4

The "Short" is actually what is displayed to your user under the "version" tab.

Sorry for my confusion. :(

No worries, it is super confusing!

I added a bunch of docs though :)

[VS sync] The field 'Milestone' contains the value '1.0.1' that is not in the list of supported values

Was this page helpful?
0 / 5 - 0 ratings