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) {