diff --git a/iBox/Sources/CustomLaunchScreen/CustomLaunchScreenViewController.swift b/iBox/Sources/CustomLaunchScreen/CustomLaunchScreenViewController.swift index 1c63d5b..4110b61 100644 --- a/iBox/Sources/CustomLaunchScreen/CustomLaunchScreenViewController.swift +++ b/iBox/Sources/CustomLaunchScreen/CustomLaunchScreenViewController.swift @@ -43,7 +43,9 @@ class CustomLaunchScreenViewController: UIViewController { .sink { [weak self] result in switch result { case .success, .maxRetryReached, .later: - self?.transitionToNextScreen() + DefaultData.insertDefaultDataIfNeeded() { + self?.transitionToNextScreen() + } print("App 정상 실행") case .urlError: print("URL 에러가 발생했습니다.") @@ -66,17 +68,12 @@ class CustomLaunchScreenViewController: UIViewController { case .internalInfoError: print("info error 수집") case .initial: - self?.startupFlow() print("init") } } .store(in: &cancellables) } - private func startupFlow() { - DefaultData.insertDefaultDataIfNeeded() - } - private func transitionToNextScreen() { guard let window = self.view.window else { return } diff --git a/iBox/Sources/Initializer/DefaultData.swift b/iBox/Sources/Initializer/DefaultData.swift index 4cc8522..b33ea54 100644 --- a/iBox/Sources/Initializer/DefaultData.swift +++ b/iBox/Sources/Initializer/DefaultData.swift @@ -21,6 +21,8 @@ class DefaultData { completion?() } } + } else { + completion?() } }