From 696ad4cef7873be7a5b9f497597f10b821e6fc77 Mon Sep 17 00:00:00 2001 From: C4ndyF1sh <128715345+C4ndyF1sh@users.noreply.github.com> Date: Tue, 15 Apr 2025 00:08:14 +0200 Subject: [PATCH] actually check the installed os version now --- StikJIT/StikJITApp.swift | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/StikJIT/StikJITApp.swift b/StikJIT/StikJITApp.swift index 2e42f5e..ea5bff9 100644 --- a/StikJIT/StikJITApp.swift +++ b/StikJIT/StikJITApp.swift @@ -646,15 +646,15 @@ struct LoadingView: View { .onAppear { animate = true - // iOS Version Check: if the device is running iOS lower than 17.4, - // set the alert bindings so that the alert is shown. - if #unavailable(iOS 17.4) { - alertTitle = "Unsupported OS Version" - alertMessage = "StikJIT only supports iOS/iPadOS 17.4 and above.\nYou're running an older version." - showAlert = true - } - } - + let os = ProcessInfo.processInfo.operatingSystemVersion + if os.majorVersion < 17 || (os.majorVersion == 17 && os.minorVersion < 4) { + // Show alert for unsupported host iOS version + alertTitle = "Unsupported OS Version" + alertMessage = "StikJIT only supports 17.4 and above. Your device is running iOS/iPadOS \(os.majorVersion).\(os.minorVersion).\(os.patchVersion)" + showAlert = true + } + } + Text("Loading...") .font(.system(size: 20, weight: .medium, design: .rounded)) .foregroundColor(isDarkMode ? .white.opacity(0.8) : .black.opacity(0.8))