From d2d44d5e9d42657dfa84e106361bbec931715032 Mon Sep 17 00:00:00 2001 From: Yu Sung Date: Thu, 21 Nov 2024 01:05:33 +0900 Subject: [PATCH] =?UTF-8?q?=EC=A0=90=EA=B2=80=EC=A4=91=20=ED=94=8C?= =?UTF-8?q?=EB=9E=98=EA=B7=B8,=20=ED=8C=9D=EC=97=85=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SodaLive/Sources/Splash/SplashView.swift | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/SodaLive/Sources/Splash/SplashView.swift b/SodaLive/Sources/Splash/SplashView.swift index 22185bb..90c32b4 100644 --- a/SodaLive/Sources/Splash/SplashView.swift +++ b/SodaLive/Sources/Splash/SplashView.swift @@ -11,6 +11,7 @@ import FirebaseRemoteConfig struct SplashView: View { @State private var isShowForcedUpdatePopup = false @State private var isShowUpdatePopup = false + @State private var isShowMaintenancePopup = false @StateObject var liveViewModel = LiveViewModel() @@ -31,6 +32,15 @@ struct SplashView: View { .padding(.bottom, screenSize().height * 240 / 2337) } + if isShowMaintenancePopup { + SodaDialog( + title: "안내", + desc: "서비스 점검중입니다.", + confirmButtonTitle: "확인", + confirmButtonAction: { isShowMaintenancePopup = false } + ) + } + if isShowUpdatePopup { SodaDialog( title: "업데이트", @@ -76,7 +86,12 @@ struct SplashView: View { remoteConfig.fetch { status, error in if status == .success { remoteConfig.activate { changed, error in - checkAppVersion(latestVersion: remoteConfig["ios_latest_version"].stringValue) + let isMaintenance = remoteConfig["is_maintenance"].boolValue + if isMaintenance { + isShowMaintenancePopup = true + } else { + checkAppVersion(latestVersion: remoteConfig["ios_latest_version"].stringValue) + } } } else { DispatchQueue.main.asyncAfter(deadline: .now() + 1.0) {