Skip to content

Commit f08eb85

Browse files
committed
[PC-630] Fix: Firebase 서버로부터 값을 불러오기 전에 RemoteConfig 값에 접근하는 문제 수정
1 parent f5ae2c8 commit f08eb85

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

App/Sources/PieceApp.swift

-10
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,6 @@ struct PieceApp: App {
2020
print("Firebase setup failed with unknown error:", error)
2121
}
2222

23-
Task {
24-
do {
25-
try await PCFirebase.shared.fetchRemoteConfigValues()
26-
} catch let error as PCFirebaseError {
27-
print("RemoteConfig fetch failed:", error.errorDescription)
28-
} catch {
29-
print("RemoteConfig fetch failed with unknown error:", error)
30-
}
31-
}
32-
3323
// Kakao SDK 초기화
3424
guard let kakaoAppKey = Bundle.main.infoDictionary?["NATIVE_APP_KEY"] as? String else {
3525
print("Failed to load Kakao App Key")

Presentation/Feature/Splash/Sources/SplashViewModel.swift

+3
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,15 @@ final class SplashViewModel {
5858

5959
Task {
6060
do {
61+
try await PCFirebase.shared.fetchRemoteConfigValues()
6162
showNeedsForceUpdateAlert = needsForceUpdate()
6263
let didSeeOnboarding = PCUserDefaultsService.shared.getDidSeeOnboarding()
6364
if didSeeOnboarding {
6465
// TODO: - SDK에 로그인 요청
6566
// TODO: - 서버에 로그인 요청
6667
}
68+
} catch let error as PCFirebaseError {
69+
print("RemoteConfig fetch failed:", error.errorDescription)
6770
} catch {
6871
print(error)
6972
}

0 commit comments

Comments
 (0)