From f92751a7d29baf4bdc81d60725e00b8b7bb7db02 Mon Sep 17 00:00:00 2001 From: Susko3 Date: Thu, 1 Feb 2024 18:56:38 +0100 Subject: [PATCH] Don't suggest an update on mobile if it isn't available --- osu.Game/Updater/SimpleUpdateManager.cs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/osu.Game/Updater/SimpleUpdateManager.cs b/osu.Game/Updater/SimpleUpdateManager.cs index a7671551ef..0f9d5b929f 100644 --- a/osu.Game/Updater/SimpleUpdateManager.cs +++ b/osu.Game/Updater/SimpleUpdateManager.cs @@ -94,15 +94,18 @@ namespace osu.Game.Updater break; case RuntimeInfo.Platform.iOS: - // iOS releases are available via testflight. this link seems to work well enough for now. - // see https://stackoverflow.com/a/32960501 - url = "itms-beta://beta.itunes.apple.com/v1/app/1447765923"; + if (release.Assets?.Exists(f => f.Name.EndsWith(".ipa", StringComparison.Ordinal)) == true) + // iOS releases are available via testflight. this link seems to work well enough for now. + // see https://stackoverflow.com/a/32960501 + url = "itms-beta://beta.itunes.apple.com/v1/app/1447765923"; + break; case RuntimeInfo.Platform.Android: - // on our testing device using the .apk URL causes the download to magically disappear. - //bestAsset = release.Assets?.Find(f => f.Name.EndsWith(".apk")); - url = release.HtmlUrl; + if (release.Assets?.Exists(f => f.Name.EndsWith(".apk", StringComparison.Ordinal)) == true) + // on our testing device using the .apk URL causes the download to magically disappear. + url = release.HtmlUrl; + break; }