`Package.Current.Id` Not providing right `Build/Revision` number for mobile
#11,216 opened on Feb 6, 2023
Repository metrics
- Stars
- (9,789 stars)
- PR merge metrics
- (Avg merge 14d 8h) (130 merged PRs in 30d)
Description
Current behavior
The current Uno implementation only make use of versionName for Android and CFBundleShortVersionString for iOS when it should also use versionCode for Android and CFBundleVersion for iOS as Build/Revision value.
See Uno documentation for more details.
So currently we must use a version with 4 numbers if we want to have the Build/Revision information in our application but on iOS they must absolutely be separated because the version as to be composed of 3 numbers.
See Apple documentation for more details.
The implementation should resemble Xamarin/MAUI Essentials a bit more for application version reading. See MAUI repositery for more details.
Expected behavior
Revision value should use versionCode for Android and CFBundleVersion for iOS or we should have an extension for the build if it's more than one digit. Whatever is best to make use of every mobile version variable.
How to reproduce it (as minimally and precisely as possible)
No sample needed, it's working but limiting our application.
Workaround
Use Xamarin/MAUI Essentials.
Works on UWP/WinUI
Yes
Environment
Uno.UI / Uno.UI.WebAssembly / Uno.UI.Skia, Uno.WinUI / Uno.WinUI.WebAssembly / Uno.WinUI.Skia
NuGet package version(s)
No response
Affected platforms
Android, iOS, Windows
IDE
Visual Studio 2022
IDE version
17.4.4
Relevant plugins
No response
Anything else we need to know?
No response