-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
256 additions
and
198 deletions.
There are no files selected for viewing
9 changes: 0 additions & 9 deletions
9
HMH_Tuist_iOS/Projects/Modules/Networks/Demo/Sources/AuthServiceTestView.swift
This file was deleted.
Oops, something went wrong.
32 changes: 32 additions & 0 deletions
32
HMH_Tuist_iOS/Projects/Modules/Networks/Demo/Sources/Navigation/DIContainer.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// | ||
// DIContainer.swift | ||
// NetworksDemo | ||
// | ||
// Created by 류희재 on 11/23/24. | ||
// Copyright © 2024 HMH-iOS. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
typealias NavigationRoutableType = NavigationRoutable & ObservableObjectSettable | ||
|
||
final class DIContainer: ObservableObject { | ||
|
||
var service: HMHServiceType | ||
var navigationRouter: NavigationRoutableType | ||
|
||
private init( | ||
service: HMHServiceType, | ||
navigationRouter: NavigationRoutableType = NavigationRouter() | ||
) { | ||
self.service = service | ||
self.navigationRouter = navigationRouter | ||
|
||
navigationRouter.setObjectWillChange(objectWillChange) | ||
} | ||
} | ||
|
||
extension DIContainer { | ||
static let `default` = DIContainer(service: HMHService()) | ||
static let stub = DIContainer(service: StubHMHSerivce()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.