From 1178c352f4685a558616754e49c1235c9c13af6b Mon Sep 17 00:00:00 2001 From: keyldev Date: Fri, 2 Oct 2026 02:56:38 +0300 Subject: [PATCH] fix(about): show the real version on Android and iOS - read the version from the App assembly: GetEntryAssembly() is null on mobile, so About fell through to the hard-coded 0.1.0 - repository link points at OpenIPC/viewer --- .../ViewModels/SettingsPageViewModel.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/OpenIPC.Viewer.App/ViewModels/SettingsPageViewModel.cs b/src/OpenIPC.Viewer.App/ViewModels/SettingsPageViewModel.cs index a74f54c..0ac2d52 100644 --- a/src/OpenIPC.Viewer.App/ViewModels/SettingsPageViewModel.cs +++ b/src/OpenIPC.Viewer.App/ViewModels/SettingsPageViewModel.cs @@ -173,11 +173,14 @@ public bool TryGoBack() // Prefer the git-tag-derived InformationalVersion (set in Directory.Build.targets) // over the numeric AssemblyVersion, which can't carry the -rc/-beta suffix. // Strip any "+metadata" just in case the SDK still appended a commit hash. + // Read from this assembly, not GetEntryAssembly(): Android and iOS have no + // managed entry point, so that returned null and About fell through to the + // fallback. Every project gets the same git-derived version. public string Version => - Assembly.GetEntryAssembly()?.GetCustomAttribute()?.InformationalVersion?.Split('+')[0] - ?? Assembly.GetEntryAssembly()?.GetName().Version?.ToString() + typeof(SettingsPageViewModel).Assembly.GetCustomAttribute()?.InformationalVersion?.Split('+')[0] + ?? typeof(SettingsPageViewModel).Assembly.GetName().Version?.ToString() ?? "0.1.0"; - public string RepositoryUrl => "https://github.com/keyldev/openipc-viewer"; + public string RepositoryUrl => "https://github.com/OpenIPC/viewer"; public SettingsPageViewModel( UserSettingsService settings,