From a4716c0af8e857261e11c7e01a47545d2f976f66 Mon Sep 17 00:00:00 2001 From: orz12 Date: Sun, 8 Sep 2024 23:26:22 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20iOS=E7=89=88=E6=9C=AC=E5=8F=B7=E9=A2=9D?= =?UTF-8?q?=E5=A4=96=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/utils/utils.dart | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/utils/utils.dart b/lib/utils/utils.dart index 5e3651a4..3ede97ec 100644 --- a/lib/utils/utils.dart +++ b/lib/utils/utils.dart @@ -346,11 +346,14 @@ class Utils { } LatestDataModel data = LatestDataModel.fromJson(result.data[0]); String buildNumber = currentInfo.buildNumber; + String remoteVersion = data.tagName!; if (Platform.isAndroid) { buildNumber = buildNumber.substring(0, buildNumber.length - 1); + } else if (Platform.isIOS) { + remoteVersion = remoteVersion.replaceAll('-beta', ''); } bool isUpdate = - Utils.needUpdate("${currentInfo.version}+$buildNumber", data.tagName!); + Utils.needUpdate("${currentInfo.version}+$buildNumber", remoteVersion); if (isUpdate) { SmartDialog.show( animationType: SmartAnimationType.centerFade_otherSlide,