From ef2af58088cce4094e8bd984d05b80d26e010c0b Mon Sep 17 00:00:00 2001 From: kwonseokki Date: Wed, 20 May 2026 01:38:23 +0900 Subject: [PATCH 1/7] =?UTF-8?q?[Fix]=20#883=20-=20=EC=95=8C=EB=A6=BC?= =?UTF-8?q?=ED=83=AD=EC=97=90=EC=84=9C=20=EC=BD=95=EC=B0=8C=EB=A5=B4?= =?UTF-8?q?=EA=B8=B0=20=EC=A7=84=EC=9E=85=20=EC=8B=9C=20isRouteFromTabBar?= =?UTF-8?q?=20=ED=94=8C=EB=9E=98=EA=B7=B8=20=EB=B9=84=ED=99=9C=EC=84=B1?= =?UTF-8?q?=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Sources/PokeFeatureBuildable.swift | 2 +- .../Coordinator/LegacyPokeBuilder.swift | 2 +- .../Sources/Coordinator/PokeBuilder.swift | 4 +-- .../Sources/Coordinator/PokeCoordinator.swift | 26 ++++--------------- .../Sources/PokeMainScene/VC/PokeMainVC.swift | 21 ++------------- .../ViewModel/PokeMainViewModel.swift | 9 +------ .../ApplicationCoordinator+Delegate.swift | 2 +- .../Sources/ApplicationCoordinator.swift | 6 ++--- .../Sources/DeepLinks/PokeDeepLink.swift | 3 ++- 9 files changed, 18 insertions(+), 57 deletions(-) diff --git a/SOPT-iOS/Projects/Features/PokeFeature/Interface/Sources/PokeFeatureBuildable.swift b/SOPT-iOS/Projects/Features/PokeFeature/Interface/Sources/PokeFeatureBuildable.swift index afcff5e63..cca957857 100644 --- a/SOPT-iOS/Projects/Features/PokeFeature/Interface/Sources/PokeFeatureBuildable.swift +++ b/SOPT-iOS/Projects/Features/PokeFeature/Interface/Sources/PokeFeatureBuildable.swift @@ -12,7 +12,7 @@ import Domain import BaseFeatureDependency public protocol PokeFeatureBuildable { - func makePokeMain(isRouteFromTabBar: Bool, coordinator: Coordinator) -> PokeMainPresentable + func makePokeMain(coordinator: Coordinator) -> PokeMainPresentable func makePokeMyFriends(coordinator: Coordinator) -> PokeMyFriendsPresentable func makePokeMyFriendsList(relation: PokeRelation) -> PokeMyFriendsListPresentable func makePokeOnboarding(coordinator: AnyCoordinatorObject) -> PokeOnboardingPresentable diff --git a/SOPT-iOS/Projects/Features/PokeFeature/Sources/Coordinator/LegacyPokeBuilder.swift b/SOPT-iOS/Projects/Features/PokeFeature/Sources/Coordinator/LegacyPokeBuilder.swift index 822340ca6..4845a9779 100644 --- a/SOPT-iOS/Projects/Features/PokeFeature/Sources/Coordinator/LegacyPokeBuilder.swift +++ b/SOPT-iOS/Projects/Features/PokeFeature/Sources/Coordinator/LegacyPokeBuilder.swift @@ -24,7 +24,7 @@ extension LegacyPokeBuilder: LegacyPokeFeatureBuildable { public func makePokeMain(isRouteFromRoot: Bool, coordinator: Coordinator) -> PokeFeatureInterface.LegacyPokeMainPresentable { let useCase = DefaultPokeMainUseCase(repository: pokeMainRepository) let viewModel = PokeMainViewModel(useCase: useCase, coordinator: coordinator) - let pokeMainVC = PokeMainVC(viewModel: viewModel, isRouteFromTabBar: true) + let pokeMainVC = PokeMainVC(viewModel: viewModel) return (pokeMainVC, viewModel) } diff --git a/SOPT-iOS/Projects/Features/PokeFeature/Sources/Coordinator/PokeBuilder.swift b/SOPT-iOS/Projects/Features/PokeFeature/Sources/Coordinator/PokeBuilder.swift index da4e57324..ff07c6fbc 100644 --- a/SOPT-iOS/Projects/Features/PokeFeature/Sources/Coordinator/PokeBuilder.swift +++ b/SOPT-iOS/Projects/Features/PokeFeature/Sources/Coordinator/PokeBuilder.swift @@ -29,10 +29,10 @@ extension PokeBuilder: PokeFeatureBuildable { return (viewController, viewModel) } - public func makePokeMain(isRouteFromTabBar: Bool, coordinator: Coordinator) -> PokeFeatureInterface.PokeMainPresentable { + public func makePokeMain(coordinator: Coordinator) -> PokeFeatureInterface.PokeMainPresentable { let useCase = DefaultPokeMainUseCase(repository: pokeMainRepository) let viewModel = PokeMainViewModel(useCase: useCase, coordinator: coordinator) - let pokeMainVC = PokeMainVC(viewModel: viewModel, isRouteFromTabBar: isRouteFromTabBar) + let pokeMainVC = PokeMainVC(viewModel: viewModel) return (pokeMainVC, viewModel) } diff --git a/SOPT-iOS/Projects/Features/PokeFeature/Sources/Coordinator/PokeCoordinator.swift b/SOPT-iOS/Projects/Features/PokeFeature/Sources/Coordinator/PokeCoordinator.swift index 0a85817b7..6d8921496 100644 --- a/SOPT-iOS/Projects/Features/PokeFeature/Sources/Coordinator/PokeCoordinator.swift +++ b/SOPT-iOS/Projects/Features/PokeFeature/Sources/Coordinator/PokeCoordinator.swift @@ -35,32 +35,16 @@ public final class PokeCoordinator: BaseCoordinator { // MARK: - Coordinator Life Cycle - public func start(isRouteFromTabBar: Bool = true) { - showPokeMain(isRouteFromTabBar: isRouteFromTabBar) - } - public override func start() { - start(isRouteFromTabBar: true) + showPokeMain() } // MARK: - Navigation - public func showPokeMain(isRouteFromTabBar: Bool) { - var pokeMain = factory.makePokeMain(isRouteFromTabBar: isRouteFromTabBar, coordinator: self) - - if isRouteFromTabBar { - self.rootController = self.navigationController - self.navigationController?.setViewControllers([pokeMain.vc], animated: false) - } else { - let newNav = UINavigationController(rootViewController: pokeMain.vc) - newNav.modalPresentationStyle = .overFullScreen - self.rootController = newNav - pokeMain.vm.onNaviBackTap = { [weak self] in - self?.navigationController?.dismiss(animated: true) - } - - self.navigationController?.present(newNav, animated: true) - } + public func showPokeMain() { + var pokeMain = factory.makePokeMain(coordinator: self) + self.rootController = self.navigationController + self.navigationController?.setViewControllers([pokeMain.vc], animated: false) pokeMain.vm.onPokeOnboardingNeeded = { [weak self] isNeeded in if isNeeded { self?.runPokeOnboardingFlow() } diff --git a/SOPT-iOS/Projects/Features/PokeFeature/Sources/PokeMainScene/VC/PokeMainVC.swift b/SOPT-iOS/Projects/Features/PokeFeature/Sources/PokeMainScene/VC/PokeMainVC.swift index 8e174c839..e769bc579 100644 --- a/SOPT-iOS/Projects/Features/PokeFeature/Sources/PokeMainScene/VC/PokeMainVC.swift +++ b/SOPT-iOS/Projects/Features/PokeFeature/Sources/PokeMainScene/VC/PokeMainVC.swift @@ -21,15 +21,10 @@ public final class PokeMainVC: UIViewController, PokeMainViewControllable { // MARK: - Properties public var viewModel: PokeMainViewModel - private var isRouteFromTabBar: Bool private var cancelBag = CancelBag() // MARK: - UI Components - private let backButton = UIButton().then { - $0.setImage(DSKitAsset.Assets.xMark.image.withTintColor(DSKitAsset.Colors.gray30.color), for: .normal) - } - private let serviceTitleLabel = UILabel().then { $0.font = UIFont.MDS.heading6.font $0.textColor = DSKitAsset.Colors.gray30.color @@ -37,7 +32,7 @@ public final class PokeMainVC: UIViewController, PokeMainViewControllable { } private lazy var navigationView = UIStackView( - arrangedSubviews: [backButton, serviceTitleLabel] + arrangedSubviews: [serviceTitleLabel] ).then { $0.axis = .horizontal $0.spacing = 2 @@ -92,11 +87,9 @@ public final class PokeMainVC: UIViewController, PokeMainViewControllable { // MARK: - initialization public init( - viewModel: PokeMainViewModel, - isRouteFromTabBar: Bool + viewModel: PokeMainViewModel ) { self.viewModel = viewModel - self.isRouteFromTabBar = isRouteFromTabBar super.init(nibName: nil, bundle: nil) } @@ -122,8 +115,6 @@ extension PokeMainVC { private func setUI() { self.navigationController?.isNavigationBarHidden = true view.backgroundColor = DSKitAsset.Colors.semanticBackground.color - - backButton.isHidden = isRouteFromTabBar } private func setDelegate() { @@ -165,11 +156,6 @@ extension PokeMainVC { private func setLayout() { self.view.addSubviews(navigationView, scrollView) - backButton.snp.makeConstraints { make in - make.width.equalTo(40) - make.height.equalTo(40) - } - navigationView.snp.makeConstraints { make in make.top.equalTo(view.safeAreaLayoutGuide) make.leading.trailing.equalTo(view.safeAreaLayoutGuide).inset(20) @@ -235,9 +221,6 @@ extension PokeMainVC { let input = PokeMainViewModel .Input( viewDidLoad: Just(()).asDriver(), - naviBackButtonTap: self.backButton - .publisher(for: .touchUpInside) - .mapVoid().asDriver(), pokedSectionHeaderButtonTap: pokedSectionHeaderView .rightButtonTap, friendSectionHeaderButtonTap: friendSectionHeaderView diff --git a/SOPT-iOS/Projects/Features/PokeFeature/Sources/PokeMainScene/ViewModel/PokeMainViewModel.swift b/SOPT-iOS/Projects/Features/PokeFeature/Sources/PokeMainScene/ViewModel/PokeMainViewModel.swift index 50126324f..7f8333a80 100644 --- a/SOPT-iOS/Projects/Features/PokeFeature/Sources/PokeMainScene/ViewModel/PokeMainViewModel.swift +++ b/SOPT-iOS/Projects/Features/PokeFeature/Sources/PokeMainScene/ViewModel/PokeMainViewModel.swift @@ -41,7 +41,6 @@ public class PokeMainViewModel: PokeMainViewModelType { public struct Input { let viewDidLoad: Driver - let naviBackButtonTap: Driver let pokedSectionHeaderButtonTap: Driver let friendSectionHeaderButtonTap: Driver let pokedSectionKokButtonTap: Driver @@ -88,13 +87,7 @@ extension PokeMainViewModel { .sink { [weak self] _ in self?.useCase.checkPokeOnboardingNeeded() self?.eventTracker.trackViewEvent(with: .viewPokeMain) - }.store(in: cancelBag) - - input.naviBackButtonTap - .sink { [weak self] _ in - self?.eventTracker.trackViewEvent(with: .clickPokeQuit) - self?.onNaviBackTap?() - }.store(in: cancelBag) + }.store(in: cancelBag) input.pokedSectionHeaderButtonTap .sink { [weak self] _ in diff --git a/SOPT-iOS/Projects/Features/RootFeature/Sources/ApplicationCoordinator+Delegate.swift b/SOPT-iOS/Projects/Features/RootFeature/Sources/ApplicationCoordinator+Delegate.swift index 9ba920361..1f35a6dc3 100644 --- a/SOPT-iOS/Projects/Features/RootFeature/Sources/ApplicationCoordinator+Delegate.swift +++ b/SOPT-iOS/Projects/Features/RootFeature/Sources/ApplicationCoordinator+Delegate.swift @@ -112,7 +112,7 @@ extension ApplicationCoordinator: NotificationCoordinatorDelegate { switch destination { case .deepLink(let url): self.notificationHandler.receive(deepLink: url) - guard let deepLink = self.notificationHandler.deepLink.value else { return } + guard let deepLink = self.notificationHandler.deepLink.value else { return } handleDeepLink(deepLink: deepLink) case .webLink(let url): self.notificationHandler.receive(webLink: url) diff --git a/SOPT-iOS/Projects/Features/RootFeature/Sources/ApplicationCoordinator.swift b/SOPT-iOS/Projects/Features/RootFeature/Sources/ApplicationCoordinator.swift index 51a8d4762..e15fe566b 100644 --- a/SOPT-iOS/Projects/Features/RootFeature/Sources/ApplicationCoordinator.swift +++ b/SOPT-iOS/Projects/Features/RootFeature/Sources/ApplicationCoordinator.swift @@ -172,7 +172,7 @@ public final class ApplicationCoordinator: BaseCoordinator { private func handleNewDeepLink(deepLink: DeepLinkComponentsExecutable) { self.rootNavigationController.popToRootViewController(animated: false) - deepLink.execute(coordinator: self) + deepLink.execute(coordinator: self) } // MARK: - handleWebLink @@ -627,7 +627,7 @@ extension ApplicationCoordinator { extension ApplicationCoordinator { @discardableResult - internal func runPokeFlow(isRouteFromTabBar: Bool = true) -> BaseCoordinator { + internal func runPokeFlow() -> BaseCoordinator { var coordinator: BaseCoordinator switch Config.coordinatorFlag { @@ -650,7 +650,7 @@ extension ApplicationCoordinator { navigationController: pokeNavigationController, factory: PokeBuilder() ) - newCoordinator.start(isRouteFromTabBar: isRouteFromTabBar) + newCoordinator.start() coordinator = newCoordinator } diff --git a/SOPT-iOS/Projects/Features/RootFeature/Sources/DeepLinks/PokeDeepLink.swift b/SOPT-iOS/Projects/Features/RootFeature/Sources/DeepLinks/PokeDeepLink.swift index 8c54b1298..38f82e20c 100644 --- a/SOPT-iOS/Projects/Features/RootFeature/Sources/DeepLinks/PokeDeepLink.swift +++ b/SOPT-iOS/Projects/Features/RootFeature/Sources/DeepLinks/PokeDeepLink.swift @@ -23,6 +23,7 @@ public struct PokeDeepLink: DeepLinkExecutable { return coordinator } - return coordinator.runPokeFlow(isRouteFromTabBar: false) + coordinator.runTabBarFlow(initSelectedTabType: .poke) + return coordinator.runPokeFlow() } } From d7e0962bdc6c9ba21060b1420a29f019c1d5c400 Mon Sep 17 00:00:00 2001 From: kwonseokki Date: Tue, 26 May 2026 22:53:10 +0900 Subject: [PATCH 2/7] =?UTF-8?q?[Del]=20#883=20-=20=EC=BD=95=EC=B0=8C?= =?UTF-8?q?=EB=A5=B4=EA=B8=B0=20=EB=A9=94=EC=9D=B8=EB=B7=B0=20onNaviBackTa?= =?UTF-8?q?p=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Interface/Sources/PokeMainPresentable.swift | 1 - .../Sources/Coordinator/LegacyPokeCoordinator.swift | 7 +------ .../PokeMainScene/ViewModel/PokeMainViewModel.swift | 1 - 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/SOPT-iOS/Projects/Features/PokeFeature/Interface/Sources/PokeMainPresentable.swift b/SOPT-iOS/Projects/Features/PokeFeature/Interface/Sources/PokeMainPresentable.swift index 6de1210b2..c15a76143 100644 --- a/SOPT-iOS/Projects/Features/PokeFeature/Interface/Sources/PokeMainPresentable.swift +++ b/SOPT-iOS/Projects/Features/PokeFeature/Interface/Sources/PokeMainPresentable.swift @@ -15,7 +15,6 @@ import Domain public protocol PokeMainViewControllable: LegacyViewControllable { } public protocol PokeMainRoutingTrigger { - var onNaviBackTap: (() -> Void)? { get set } var onPokeNotificationsTap: (() -> Void)? { get set } var onMyFriendsTap: (() -> Void)? { get set } var onProfileImageTapped: ((Int) -> Void)? { get set } diff --git a/SOPT-iOS/Projects/Features/PokeFeature/Sources/Coordinator/LegacyPokeCoordinator.swift b/SOPT-iOS/Projects/Features/PokeFeature/Sources/Coordinator/LegacyPokeCoordinator.swift index f9c1c5835..0e67855e6 100644 --- a/SOPT-iOS/Projects/Features/PokeFeature/Sources/Coordinator/LegacyPokeCoordinator.swift +++ b/SOPT-iOS/Projects/Features/PokeFeature/Sources/Coordinator/LegacyPokeCoordinator.swift @@ -33,12 +33,7 @@ final class LegacyPokeCoordinator: BaseCoordinator { } public func showPokeMain(isRouteFromRoot: Bool) { - var pokeMain = factory.makePokeMain(isRouteFromRoot: isRouteFromRoot, coordinator: self) - - pokeMain.vm.onNaviBackTap = { [weak self] in - self?.router.dismissModule(animated: true) - self?.finishFlow?() - } + var pokeMain = factory.makePokeMain(isRouteFromRoot: isRouteFromRoot, coordinator: self) pokeMain.vm.onPokeNotificationsTap = { [weak self] in self?.runPokeNotificationListFlow() diff --git a/SOPT-iOS/Projects/Features/PokeFeature/Sources/PokeMainScene/ViewModel/PokeMainViewModel.swift b/SOPT-iOS/Projects/Features/PokeFeature/Sources/PokeMainScene/ViewModel/PokeMainViewModel.swift index 7f8333a80..66a5b5b80 100644 --- a/SOPT-iOS/Projects/Features/PokeFeature/Sources/PokeMainScene/ViewModel/PokeMainViewModel.swift +++ b/SOPT-iOS/Projects/Features/PokeFeature/Sources/PokeMainScene/ViewModel/PokeMainViewModel.swift @@ -21,7 +21,6 @@ public class PokeMainViewModel: PokeMainViewModelType { // MARK: - Trigger - public var onNaviBackTap: (() -> Void)? public var onPokeNotificationsTap: (() -> Void)? public var onMyFriendsTap: (() -> Void)? public var onProfileImageTapped: ((Int) -> Void)? From 6248d4a184f12bafb18e4b9ac528d76fc80c6919 Mon Sep 17 00:00:00 2001 From: kwonseokki Date: Wed, 27 May 2026 01:05:59 +0900 Subject: [PATCH 3/7] =?UTF-8?q?[Fix]=20#833=20=EB=94=A5=EB=A7=81=ED=81=AC?= =?UTF-8?q?=20=EC=B2=98=EB=A6=AC=20=EC=8B=9C=20=EC=A7=84=EC=9E=85=20?= =?UTF-8?q?=ED=83=AD=20=ED=94=84=EB=A1=9C=ED=8D=BC=ED=8B=B0=20=EC=A0=80?= =?UTF-8?q?=EC=9E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DeepLink/DeepLinkComponentsExecutable.swift | 2 ++ .../NotificationHelpers/DeepLinkComponents.swift | 9 ++++++--- .../NotificationHelpers/NotificationHandler.swift | 13 +++++++++++-- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/SOPT-iOS/Projects/Features/BaseFeatureDependency/Sources/Coordinator/DeepLink/DeepLinkComponentsExecutable.swift b/SOPT-iOS/Projects/Features/BaseFeatureDependency/Sources/Coordinator/DeepLink/DeepLinkComponentsExecutable.swift index c459a4af1..81f6fb3dd 100644 --- a/SOPT-iOS/Projects/Features/BaseFeatureDependency/Sources/Coordinator/DeepLink/DeepLinkComponentsExecutable.swift +++ b/SOPT-iOS/Projects/Features/BaseFeatureDependency/Sources/Coordinator/DeepLink/DeepLinkComponentsExecutable.swift @@ -7,10 +7,12 @@ // import Foundation +import Core public protocol DeepLinkComponentsExecutable { var queryItems: [URLQueryItem]? { get } var isEmpty: Bool { get } + var targetTap: TabBarItemType? { get } func execute(coordinator: Coordinator) func addDeepLink(_ deepLink: DeepLinkExecutable) func getQueryItemValue(name: String) -> String? diff --git a/SOPT-iOS/Projects/Features/RootFeature/Sources/NotificationHelpers/DeepLinkComponents.swift b/SOPT-iOS/Projects/Features/RootFeature/Sources/NotificationHelpers/DeepLinkComponents.swift index 82d462b3a..ce34f5147 100644 --- a/SOPT-iOS/Projects/Features/RootFeature/Sources/NotificationHelpers/DeepLinkComponents.swift +++ b/SOPT-iOS/Projects/Features/RootFeature/Sources/NotificationHelpers/DeepLinkComponents.swift @@ -8,25 +8,28 @@ import Foundation import BaseFeatureDependency +import Core public class DeepLinkComponents: DeepLinkComponentsExecutable { private var deepLinks: [DeepLinkExecutable] public let queryItems: [URLQueryItem]? + public var targetTap: TabBarItemType? public var isEmpty: Bool { self.deepLinks.isEmpty } - public init(deepLinkData: DeepLinkData) { + public init(deepLinkData: DeepLinkData, targetTap: TabBarItemType?) { self.deepLinks = deepLinkData.deepLinks self.queryItems = deepLinkData.queryItems + self.targetTap = targetTap } - public convenience init?(deepLinkData: DeepLinkData?) { + public convenience init?(deepLinkData: DeepLinkData?, targetTap: TabBarItemType?) { guard let deepLinkData = deepLinkData else { return nil } - self.init(deepLinkData: deepLinkData) + self.init(deepLinkData: deepLinkData, targetTap: targetTap) } // deepLink 배열을 재귀적으로 돌며 각 단계의 딥링크 뷰로 이동시킨다. diff --git a/SOPT-iOS/Projects/Features/RootFeature/Sources/NotificationHelpers/NotificationHandler.swift b/SOPT-iOS/Projects/Features/RootFeature/Sources/NotificationHelpers/NotificationHandler.swift index 594d4c570..fe5a05564 100644 --- a/SOPT-iOS/Projects/Features/RootFeature/Sources/NotificationHelpers/NotificationHandler.swift +++ b/SOPT-iOS/Projects/Features/RootFeature/Sources/NotificationHelpers/NotificationHandler.swift @@ -75,16 +75,25 @@ extension NotificationHandler { do { let deepLinkData = try deepLinkParser.parse(with: deepLink) - let deepLinkComponents = DeepLinkComponents(deepLinkData: deepLinkData) + let targetTap = resolveTargetTap(deepLinkData: deepLinkData) + + let deepLinkComponents = DeepLinkComponents(deepLinkData: deepLinkData, targetTap: targetTap) self.deepLink.send(deepLinkComponents) } catch { self.handleLinkError(error: error) } } + private func resolveTargetTap(deepLinkData: DeepLinkData) -> TabBarItemType? { + if deepLinkData.deepLinks.first?.name == PokeDeepLink.path { + return .poke + } + return nil + } + private func makeComponentsForEmptyLink(notificationId: String) -> DeepLinkComponents? { let deepLinkData = try? deepLinkParser.parse(with: "home/notification/detail?id=\(notificationId)") - return DeepLinkComponents(deepLinkData: deepLinkData) + return DeepLinkComponents(deepLinkData: deepLinkData, targetTap: .poke) } private func handleWebLink(with webLink: String?) { From 5f3bca50c265ef465e3bcac5824728dc4256cdb9 Mon Sep 17 00:00:00 2001 From: kwonseokki Date: Wed, 27 May 2026 01:07:42 +0900 Subject: [PATCH 4/7] =?UTF-8?q?[Fix]=20#883=20-=20=EC=99=B8=EB=B6=80=20?= =?UTF-8?q?=EC=A0=91=EA=B7=BC=EC=9D=B4=20=EA=B0=80=EB=8A=A5=ED=95=9C=20?= =?UTF-8?q?=EB=94=A5=EB=A7=81=ED=81=AC=20=EC=83=81=EC=88=98=20=ED=94=84?= =?UTF-8?q?=EB=A1=9C=ED=8D=BC=ED=8B=B0=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../RootFeature/Sources/DeepLinks/PokeDeepLink.swift | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/SOPT-iOS/Projects/Features/RootFeature/Sources/DeepLinks/PokeDeepLink.swift b/SOPT-iOS/Projects/Features/RootFeature/Sources/DeepLinks/PokeDeepLink.swift index 38f82e20c..2669665b1 100644 --- a/SOPT-iOS/Projects/Features/RootFeature/Sources/DeepLinks/PokeDeepLink.swift +++ b/SOPT-iOS/Projects/Features/RootFeature/Sources/DeepLinks/PokeDeepLink.swift @@ -9,21 +9,22 @@ import Foundation import BaseFeatureDependency import PokeFeature +import Core public struct PokeDeepLink: DeepLinkExecutable { - public let name = "poke" + public static let path = "poke" + + public let name = path public let children: [DeepLinkExecutable] = [PokeNotificationListDeepLink()] - public var isDestination: Bool = false + public var isDestination: Bool = false public func execute(with coordinator: Coordinator, queryItems: [URLQueryItem]?) -> Coordinator? { guard let coordinator = coordinator as? ApplicationCoordinator else { return nil } if self.isDestination == true { - coordinator.runTabBarFlow(initSelectedTabType: .poke) return coordinator } - coordinator.runTabBarFlow(initSelectedTabType: .poke) return coordinator.runPokeFlow() } } From c8ae69d1385d2da8f82529c067ed7da782f0bc12 Mon Sep 17 00:00:00 2001 From: kwonseokki Date: Wed, 27 May 2026 01:09:32 +0900 Subject: [PATCH 5/7] =?UTF-8?q?[Fix]=20#883=20-=20=EC=BD=95=EC=B0=8C?= =?UTF-8?q?=EB=A5=B4=EA=B8=B0=20=EB=94=A5=EB=A7=81=ED=81=AC=20=EC=A7=84?= =?UTF-8?q?=EC=9E=85=20=EC=8B=9C=20=ED=83=AD=20=EC=A0=84=ED=99=98=20?= =?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 --- .../RootFeature/Sources/ApplicationCoordinator.swift | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/SOPT-iOS/Projects/Features/RootFeature/Sources/ApplicationCoordinator.swift b/SOPT-iOS/Projects/Features/RootFeature/Sources/ApplicationCoordinator.swift index e15fe566b..cdc0ecd35 100644 --- a/SOPT-iOS/Projects/Features/RootFeature/Sources/ApplicationCoordinator.swift +++ b/SOPT-iOS/Projects/Features/RootFeature/Sources/ApplicationCoordinator.swift @@ -172,7 +172,10 @@ public final class ApplicationCoordinator: BaseCoordinator { private func handleNewDeepLink(deepLink: DeepLinkComponentsExecutable) { self.rootNavigationController.popToRootViewController(animated: false) - deepLink.execute(coordinator: self) + if let targetTap = deepLink.targetTap { + tabBarController?.selectedIndex = targetTap.getTabIndex(userType: UserDefaultKeyList.Auth.getUserType()) + } + deepLink.execute(coordinator: self) } // MARK: - handleWebLink @@ -443,6 +446,7 @@ extension ApplicationCoordinator { coordinator.delegate = self coordinator.start() + self.tabBarController = coordinator.tabBarController } } @@ -650,10 +654,10 @@ extension ApplicationCoordinator { navigationController: pokeNavigationController, factory: PokeBuilder() ) - newCoordinator.start() + newCoordinator.start() coordinator = newCoordinator } - + return coordinator } From a80a77d02fe2a366565acd92527aa48ea233787e Mon Sep 17 00:00:00 2001 From: kwonseokki Date: Mon, 1 Jun 2026 17:48:57 +0900 Subject: [PATCH 6/7] =?UTF-8?q?[Fix]=20#883=20-=20=ED=83=AD=EB=B0=94=20?= =?UTF-8?q?=EA=B4=80=EB=A0=A8=20=EC=88=98=EC=A0=95=20=EC=BD=94=EB=93=9C=20?= =?UTF-8?q?=EB=A1=A4=EB=B0=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DeepLink/DeepLinkComponentsExecutable.swift | 2 -- .../Sources/ApplicationCoordinator.swift | 10 +++------- .../Sources/DeepLinks/PokeDeepLink.swift | 9 ++++----- .../NotificationHelpers/DeepLinkComponents.swift | 9 +++------ .../NotificationHelpers/NotificationHandler.swift | 13 ++----------- 5 files changed, 12 insertions(+), 31 deletions(-) diff --git a/SOPT-iOS/Projects/Features/BaseFeatureDependency/Sources/Coordinator/DeepLink/DeepLinkComponentsExecutable.swift b/SOPT-iOS/Projects/Features/BaseFeatureDependency/Sources/Coordinator/DeepLink/DeepLinkComponentsExecutable.swift index 81f6fb3dd..c459a4af1 100644 --- a/SOPT-iOS/Projects/Features/BaseFeatureDependency/Sources/Coordinator/DeepLink/DeepLinkComponentsExecutable.swift +++ b/SOPT-iOS/Projects/Features/BaseFeatureDependency/Sources/Coordinator/DeepLink/DeepLinkComponentsExecutable.swift @@ -7,12 +7,10 @@ // import Foundation -import Core public protocol DeepLinkComponentsExecutable { var queryItems: [URLQueryItem]? { get } var isEmpty: Bool { get } - var targetTap: TabBarItemType? { get } func execute(coordinator: Coordinator) func addDeepLink(_ deepLink: DeepLinkExecutable) func getQueryItemValue(name: String) -> String? diff --git a/SOPT-iOS/Projects/Features/RootFeature/Sources/ApplicationCoordinator.swift b/SOPT-iOS/Projects/Features/RootFeature/Sources/ApplicationCoordinator.swift index cdc0ecd35..e15fe566b 100644 --- a/SOPT-iOS/Projects/Features/RootFeature/Sources/ApplicationCoordinator.swift +++ b/SOPT-iOS/Projects/Features/RootFeature/Sources/ApplicationCoordinator.swift @@ -172,10 +172,7 @@ public final class ApplicationCoordinator: BaseCoordinator { private func handleNewDeepLink(deepLink: DeepLinkComponentsExecutable) { self.rootNavigationController.popToRootViewController(animated: false) - if let targetTap = deepLink.targetTap { - tabBarController?.selectedIndex = targetTap.getTabIndex(userType: UserDefaultKeyList.Auth.getUserType()) - } - deepLink.execute(coordinator: self) + deepLink.execute(coordinator: self) } // MARK: - handleWebLink @@ -446,7 +443,6 @@ extension ApplicationCoordinator { coordinator.delegate = self coordinator.start() - self.tabBarController = coordinator.tabBarController } } @@ -654,10 +650,10 @@ extension ApplicationCoordinator { navigationController: pokeNavigationController, factory: PokeBuilder() ) - newCoordinator.start() + newCoordinator.start() coordinator = newCoordinator } - + return coordinator } diff --git a/SOPT-iOS/Projects/Features/RootFeature/Sources/DeepLinks/PokeDeepLink.swift b/SOPT-iOS/Projects/Features/RootFeature/Sources/DeepLinks/PokeDeepLink.swift index 2669665b1..38f82e20c 100644 --- a/SOPT-iOS/Projects/Features/RootFeature/Sources/DeepLinks/PokeDeepLink.swift +++ b/SOPT-iOS/Projects/Features/RootFeature/Sources/DeepLinks/PokeDeepLink.swift @@ -9,22 +9,21 @@ import Foundation import BaseFeatureDependency import PokeFeature -import Core public struct PokeDeepLink: DeepLinkExecutable { - public static let path = "poke" - - public let name = path + public let name = "poke" public let children: [DeepLinkExecutable] = [PokeNotificationListDeepLink()] - public var isDestination: Bool = false + public var isDestination: Bool = false public func execute(with coordinator: Coordinator, queryItems: [URLQueryItem]?) -> Coordinator? { guard let coordinator = coordinator as? ApplicationCoordinator else { return nil } if self.isDestination == true { + coordinator.runTabBarFlow(initSelectedTabType: .poke) return coordinator } + coordinator.runTabBarFlow(initSelectedTabType: .poke) return coordinator.runPokeFlow() } } diff --git a/SOPT-iOS/Projects/Features/RootFeature/Sources/NotificationHelpers/DeepLinkComponents.swift b/SOPT-iOS/Projects/Features/RootFeature/Sources/NotificationHelpers/DeepLinkComponents.swift index ce34f5147..82d462b3a 100644 --- a/SOPT-iOS/Projects/Features/RootFeature/Sources/NotificationHelpers/DeepLinkComponents.swift +++ b/SOPT-iOS/Projects/Features/RootFeature/Sources/NotificationHelpers/DeepLinkComponents.swift @@ -8,28 +8,25 @@ import Foundation import BaseFeatureDependency -import Core public class DeepLinkComponents: DeepLinkComponentsExecutable { private var deepLinks: [DeepLinkExecutable] public let queryItems: [URLQueryItem]? - public var targetTap: TabBarItemType? public var isEmpty: Bool { self.deepLinks.isEmpty } - public init(deepLinkData: DeepLinkData, targetTap: TabBarItemType?) { + public init(deepLinkData: DeepLinkData) { self.deepLinks = deepLinkData.deepLinks self.queryItems = deepLinkData.queryItems - self.targetTap = targetTap } - public convenience init?(deepLinkData: DeepLinkData?, targetTap: TabBarItemType?) { + public convenience init?(deepLinkData: DeepLinkData?) { guard let deepLinkData = deepLinkData else { return nil } - self.init(deepLinkData: deepLinkData, targetTap: targetTap) + self.init(deepLinkData: deepLinkData) } // deepLink 배열을 재귀적으로 돌며 각 단계의 딥링크 뷰로 이동시킨다. diff --git a/SOPT-iOS/Projects/Features/RootFeature/Sources/NotificationHelpers/NotificationHandler.swift b/SOPT-iOS/Projects/Features/RootFeature/Sources/NotificationHelpers/NotificationHandler.swift index fe5a05564..594d4c570 100644 --- a/SOPT-iOS/Projects/Features/RootFeature/Sources/NotificationHelpers/NotificationHandler.swift +++ b/SOPT-iOS/Projects/Features/RootFeature/Sources/NotificationHelpers/NotificationHandler.swift @@ -75,25 +75,16 @@ extension NotificationHandler { do { let deepLinkData = try deepLinkParser.parse(with: deepLink) - let targetTap = resolveTargetTap(deepLinkData: deepLinkData) - - let deepLinkComponents = DeepLinkComponents(deepLinkData: deepLinkData, targetTap: targetTap) + let deepLinkComponents = DeepLinkComponents(deepLinkData: deepLinkData) self.deepLink.send(deepLinkComponents) } catch { self.handleLinkError(error: error) } } - private func resolveTargetTap(deepLinkData: DeepLinkData) -> TabBarItemType? { - if deepLinkData.deepLinks.first?.name == PokeDeepLink.path { - return .poke - } - return nil - } - private func makeComponentsForEmptyLink(notificationId: String) -> DeepLinkComponents? { let deepLinkData = try? deepLinkParser.parse(with: "home/notification/detail?id=\(notificationId)") - return DeepLinkComponents(deepLinkData: deepLinkData, targetTap: .poke) + return DeepLinkComponents(deepLinkData: deepLinkData) } private func handleWebLink(with webLink: String?) { From 0f90bec17540c7040ea4c3f90d64e2208b428769 Mon Sep 17 00:00:00 2001 From: kwonseokki Date: Mon, 1 Jun 2026 17:53:55 +0900 Subject: [PATCH 7/7] =?UTF-8?q?[Fix]=20#883=20-=20PokeDeepLink=20=EC=97=90?= =?UTF-8?q?=EC=84=9C=20=ED=83=AD=EB=B0=94=20=EC=A0=84=ED=99=98=ED=95=98?= =?UTF-8?q?=EB=8F=84=EB=A1=9D=20=EC=BD=94=EB=93=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../RootFeature/Sources/DeepLinks/PokeDeepLink.swift | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/SOPT-iOS/Projects/Features/RootFeature/Sources/DeepLinks/PokeDeepLink.swift b/SOPT-iOS/Projects/Features/RootFeature/Sources/DeepLinks/PokeDeepLink.swift index 38f82e20c..155470246 100644 --- a/SOPT-iOS/Projects/Features/RootFeature/Sources/DeepLinks/PokeDeepLink.swift +++ b/SOPT-iOS/Projects/Features/RootFeature/Sources/DeepLinks/PokeDeepLink.swift @@ -9,6 +9,7 @@ import Foundation import BaseFeatureDependency import PokeFeature +import Core public struct PokeDeepLink: DeepLinkExecutable { public let name = "poke" @@ -18,12 +19,13 @@ public struct PokeDeepLink: DeepLinkExecutable { public func execute(with coordinator: Coordinator, queryItems: [URLQueryItem]?) -> Coordinator? { guard let coordinator = coordinator as? ApplicationCoordinator else { return nil } + let userType = UserDefaultKeyList.Auth.getUserType() + coordinator.tabBarController?.selectedIndex = TabBarItemType.poke.getTabIndex(userType: userType) + if self.isDestination == true { - coordinator.runTabBarFlow(initSelectedTabType: .poke) return coordinator } - - coordinator.runTabBarFlow(initSelectedTabType: .poke) + return coordinator.runPokeFlow() } }