From 1c7bd382f17b4605c75a1700793a944fbfb563df Mon Sep 17 00:00:00 2001 From: yeonee Date: Fri, 6 Feb 2026 16:43:43 +0900 Subject: [PATCH 1/5] =?UTF-8?q?chore:=20#350=20=EC=8B=A4=EA=B8=B0=EA=B8=B0?= =?UTF-8?q?=20=EB=B9=8C=EB=93=9C=20=EC=9D=B8=EC=A6=9D=EC=84=9C=20=EC=98=A4?= =?UTF-8?q?=EB=A5=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ByeBoo-iOS.xcodeproj/project.pbxproj | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/ByeBoo-iOS/ByeBoo-iOS.xcodeproj/project.pbxproj b/ByeBoo-iOS/ByeBoo-iOS.xcodeproj/project.pbxproj index 16c57433..a1a6dc42 100644 --- a/ByeBoo-iOS/ByeBoo-iOS.xcodeproj/project.pbxproj +++ b/ByeBoo-iOS/ByeBoo-iOS.xcodeproj/project.pbxproj @@ -277,7 +277,7 @@ CODE_SIGN_ENTITLEMENTS = "ByeBoo-iOS/ByeBoo-Dev.entitlements"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 6; + CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = Z6682N5G5D; GENERATE_INFOPLIST_FILE = YES; @@ -294,11 +294,11 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.1.2; + MARKETING_VERSION = 1.1.0; PRODUCT_BUNDLE_IDENTIFIER = "com.heartz.ByeBoo-iOS"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; - "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "match AppStore com.heartz.ByeBoo-iOS"; + "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "match Development com.heartz.ByeBoo-iOS"; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; SUPPORTS_MACCATALYST = NO; SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; @@ -317,9 +317,9 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_ENTITLEMENTS = "ByeBoo-iOS/ByeBoo-Prod.entitlements"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 6; + CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = Z6682N5G5D; GENERATE_INFOPLIST_FILE = YES; @@ -336,11 +336,11 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.1.2; + MARKETING_VERSION = 1.1.0; PRODUCT_BUNDLE_IDENTIFIER = "com.heartz.ByeBoo-iOS"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; - "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "match Development com.heartz.ByeBoo-iOS"; + "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "match AppStore com.heartz.ByeBoo-iOS"; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; SUPPORTS_MACCATALYST = NO; SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; @@ -480,7 +480,7 @@ buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 6; + CURRENT_PROJECT_VERSION = 1; GENERATE_INFOPLIST_FILE = YES; IPHONEOS_DEPLOYMENT_TARGET = 18.2; MACOSX_DEPLOYMENT_TARGET = 15.2; @@ -502,7 +502,7 @@ buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 6; + CURRENT_PROJECT_VERSION = 1; GENERATE_INFOPLIST_FILE = YES; IPHONEOS_DEPLOYMENT_TARGET = 18.2; MACOSX_DEPLOYMENT_TARGET = 15.2; From d5fdc6c935d3e5bead4ad9b4dc8e76afd6c6e51b Mon Sep 17 00:00:00 2001 From: yeonee Date: Sun, 8 Feb 2026 01:09:56 +0900 Subject: [PATCH 2/5] =?UTF-8?q?refactor:=20#350=20=EB=B2=84=ED=8A=BC=20?= =?UTF-8?q?=EC=97=AC=EB=9F=AC=EB=B2=88=20=ED=84=B0=EC=B9=98=ED=95=B4?= =?UTF-8?q?=EB=8F=84=20=ED=95=9C=EB=B2=88=EB=A7=8C=20api=20=ED=98=B8?= =?UTF-8?q?=EC=B6=9C=EB=90=98=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ByeBoo-iOS/Data/Repository/AuthRepository.swift | 4 ++-- .../Login/ViewController/LoginViewController.swift | 9 +++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ByeBoo-iOS/ByeBoo-iOS/Data/Repository/AuthRepository.swift b/ByeBoo-iOS/ByeBoo-iOS/Data/Repository/AuthRepository.swift index c6d2c9b3..985db17f 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Data/Repository/AuthRepository.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Data/Repository/AuthRepository.swift @@ -98,7 +98,7 @@ struct DefaultAuthRepository: AuthInterface { func autoLogin() async throws -> Bool { let isOnboardingCompleted: Bool = userDefaultsService.load(key: .isOnboardingCompleted) ?? false - ByeBooLogger.debug(isOnboardingCompleted) + ByeBooLogger.debug("온보딩 여부 \(isOnboardingCompleted)") if !keychainService.load(key: .accessToken).isEmpty && !keychainService.load(key: .refreshToken).isEmpty @@ -214,7 +214,7 @@ final class MockAuthRepository: AuthInterface { func appleLogin(platform: LoginPlatform) async throws { appleLoginCalled = true - var (identityToken, authorizationCode) = try await network.appleRequest() + let (identityToken, authorizationCode) = try await network.appleRequest() let _ = userDefaultsService.save("APPLE", key: .loginPlatform) keychainService.save(key: .authorization, token: identityToken) keychainService.save(key: .authorizationCode, token: authorizationCode) diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Login/ViewController/LoginViewController.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Login/ViewController/LoginViewController.swift index 7e145e2d..2f319175 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Login/ViewController/LoginViewController.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Login/ViewController/LoginViewController.swift @@ -43,12 +43,14 @@ final class LoginViewController: BaseViewController { extension LoginViewController{ @objc private func kakaoLoginButtonDidTap() { + rootView.kakaoLoginButton.isUserInteractionEnabled = false self.platform = .KAKAO viewModel.action(.socialLoginButtonDidTap(platform: .KAKAO)) } @objc private func appleLoginButtonDidTap() { + rootView.appleLoginButton.isUserInteractionEnabled = false self.platform = .APPLE viewModel.action(.socialLoginButtonDidTap(platform: .APPLE)) } @@ -57,12 +59,15 @@ extension LoginViewController{ extension LoginViewController { private func bind() { viewModel.output.isRegisteredPublisher - .throttle(for: .seconds(1.0), scheduler: DispatchQueue.main, latest: false) .receive(on: DispatchQueue.main) .sink { result in + self.rootView.appleLoginButton.isUserInteractionEnabled = true + self.rootView.kakaoLoginButton.isUserInteractionEnabled = true + switch result { case .success(let isRegisterd): - ByeBooLogger.debug(isRegisterd) + ByeBooLogger.debug("온보딩 완료 여부 \(isRegisterd)") + let nextViewController: UIViewController if isRegisterd { nextViewController = ByeBooTabBar() From d6948979edd505c867fd1d2528043cfc5b2c2c93 Mon Sep 17 00:00:00 2001 From: yeonee Date: Fri, 13 Feb 2026 02:53:02 +0900 Subject: [PATCH 3/5] =?UTF-8?q?refactor:=20#350=20=EC=8B=A4=ED=8C=A8?= =?UTF-8?q?=EC=B2=98=EB=A6=AC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Presentation/Feature/Login/ViewModel/SplashViewModel.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Login/ViewModel/SplashViewModel.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Login/ViewModel/SplashViewModel.swift index a14cef3d..bbfc1993 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Login/ViewModel/SplashViewModel.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Login/ViewModel/SplashViewModel.swift @@ -64,6 +64,7 @@ extension SplashViewModel { guard let error = error as? ByeBooError else { return } + autoLoginSubject.send(.failure((.noData))) ByeBooLogger.debug(ByeBooError.networkConnect) ByeBooLogger.error(error as ByeBooError) } From 9cb62d5649c72572d7ca0e1323338edd408e4049 Mon Sep 17 00:00:00 2001 From: yeonee Date: Fri, 13 Feb 2026 02:53:15 +0900 Subject: [PATCH 4/5] =?UTF-8?q?refactor:=20#350=20actor=EB=A1=9C=20?= =?UTF-8?q?=ED=86=A0=ED=81=B0=EC=84=9C=EB=B9=84=EC=8A=A4=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Persistence/Service/TokenService.swift | 79 ++++++++++++------- 1 file changed, 52 insertions(+), 27 deletions(-) diff --git a/ByeBoo-iOS/ByeBoo-iOS/Data/Persistence/Service/TokenService.swift b/ByeBoo-iOS/ByeBoo-iOS/Data/Persistence/Service/TokenService.swift index 97d46269..e58554b3 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Data/Persistence/Service/TokenService.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Data/Persistence/Service/TokenService.swift @@ -9,20 +9,37 @@ import Foundation import Alamofire -protocol TokenService { +protocol TokenService: Sendable { func reissue() async throws } -final class DefaultTokenService: TokenService { + +actor DefaultTokenService: TokenService { + private var tokenTask: Task? private let keychainService: KeychainService - init( - keychainService: KeychainService - ) { + + init(keychainService: KeychainService) { self.keychainService = keychainService } func reissue() async throws { + + if let task = tokenTask { + return try await task.value + } + + let task = Task { + try await fetchAuthReissue() + } + + tokenTask = task + defer { tokenTask = nil } + + return try await task.value + } + + private func fetchAuthReissue() async throws { let header: HeaderType = .withAuth(acessToken: keychainService.load(key: .refreshToken)) ByeBooLogger.debug("토큰 재발급 시작") @@ -39,6 +56,8 @@ final class DefaultTokenService: TokenService { .validate() .responseDecodable(of: BaseResponse.self) { [weak self] response in guard let self else { return } + ByeBooLogger.debug("!!Reissue \(response)") + switch response.result { case .success(let data): guard let data = data.data else { @@ -46,39 +65,45 @@ final class DefaultTokenService: TokenService { continuation.resume(throwing: ByeBooError.noData) return } - ByeBooLogger.debug("토큰 재발급 완료") - self.keychainService.save(key: .accessToken, token: data.accessToken) - self.keychainService.save(key: .refreshToken, token: data.refreshToken) - continuation.resume(returning: ()) - case .failure(let error): - ByeBooLogger.debug("토큰 재발급 실패, 키체인 삭제 후 로그인으로 이동") - self.clearKeychain() - DispatchQueue.main.async { - NotificationCenter.default.post(name: .navigateLoginViewController, object: nil) + + Task { + await self.debugTokenReissueSuccess(data) + continuation.resume(returning: ()) } - if let data = response.data, - let statusCode = response.response?.statusCode, - let errorResponse = try? JSONDecoder().decode(EmptyResponse.self, from: data) { - ByeBooLogger.error(error) + + case .failure(let error): + Task { + await self.debugTokenReissueFailure() continuation.resume(throwing: error) - } else { - ByeBooLogger.error(ByeBooError.decodingError) - continuation.resume(throwing: ByeBooError.decodingError) } } } } } -} - -extension DefaultTokenService { + + private func debugTokenReissueSuccess(_ data: TokenReissueResponseDTO) { + ByeBooLogger.debug("토큰 재발급 완료") + self.keychainService.save(key: .accessToken, token: data.accessToken) + self.keychainService.save(key: .refreshToken, token: data.refreshToken) + } + + private func debugTokenReissueFailure() { + ByeBooLogger.debug("토큰 재발급 실패, 키체인 삭제 후 로그인으로 이동") + clearKeychain() + DispatchQueue.main.async { + NotificationCenter.default.post(name: .navigateLoginViewController, object: nil) + } + } + private func clearKeychain() { + ByeBooLogger.debug("clearKeychain() called (TokenService)\n\(Thread.callStackSymbols.joined(separator: "\n"))") for key in KeyType.allCases { let token = keychainService.load(key: key) - if !token.isEmpty { - keychainService.delete(key: key) - ByeBooLogger.debug("\(key) 삭제") + if !token.isEmpty { + keychainService.delete(key: key) + ByeBooLogger.debug("\(key) 삭제") } } } + } From b129609b0fb6662e05769ef71dc6d1e999111e33 Mon Sep 17 00:00:00 2001 From: yeonee Date: Fri, 13 Feb 2026 03:15:49 +0900 Subject: [PATCH 5/5] =?UTF-8?q?chore:=20#350=20=EC=A3=BC=EC=84=9D=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ByeBoo-iOS/Data/Persistence/Service/TokenService.swift | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ByeBoo-iOS/ByeBoo-iOS/Data/Persistence/Service/TokenService.swift b/ByeBoo-iOS/ByeBoo-iOS/Data/Persistence/Service/TokenService.swift index e58554b3..2bfd6126 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Data/Persistence/Service/TokenService.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Data/Persistence/Service/TokenService.swift @@ -56,7 +56,7 @@ actor DefaultTokenService: TokenService { .validate() .responseDecodable(of: BaseResponse.self) { [weak self] response in guard let self else { return } - ByeBooLogger.debug("!!Reissue \(response)") + ByeBooLogger.debug("💡Reissue \(response)") switch response.result { case .success(let data): @@ -96,7 +96,6 @@ actor DefaultTokenService: TokenService { } private func clearKeychain() { - ByeBooLogger.debug("clearKeychain() called (TokenService)\n\(Thread.callStackSymbols.joined(separator: "\n"))") for key in KeyType.allCases { let token = keychainService.load(key: key) if !token.isEmpty {