-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MERGE] Coordinator Pattern ์ ์ฉ (#139)
[REFACTOR] Coordinator Pattern ์ ์ฉ (#139)
- Loading branch information
Showing
64 changed files
with
1,283 additions
and
214 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// | ||
// TokenState.swift | ||
// LionHeart-iOS | ||
// | ||
// Created by uiskim on 2023/10/14. | ||
// | ||
|
||
import Foundation | ||
|
||
enum TokenState { | ||
case valid | ||
case expired | ||
} |
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,13 @@ | ||
// | ||
// UserState.swift | ||
// LionHeart-iOS | ||
// | ||
// Created by uiskim on 2023/10/14. | ||
// | ||
|
||
import Foundation | ||
|
||
enum UserState { | ||
case verified | ||
case nonVerified | ||
} |
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
10 changes: 0 additions & 10 deletions
10
LionHeart-iOS/LionHeart-iOS/Global/Literals/DummyModel.swift
This file was deleted.
Oops, something went wrong.
31 changes: 31 additions & 0 deletions
31
LionHeart-iOS/LionHeart-iOS/Global/Protocols/Coordinator.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,31 @@ | ||
// | ||
// Coordinator.swift | ||
// LionHeart-iOS | ||
// | ||
// Created by uiskim on 2023/10/13. | ||
// | ||
|
||
import UIKit | ||
|
||
protocol Coordinator : AnyObject { | ||
var parentCoordinator: Coordinator? { get set } | ||
var children: [Coordinator] { get set } | ||
var navigationController : UINavigationController { get set } | ||
|
||
func start() | ||
} | ||
|
||
extension Coordinator { | ||
|
||
/// Removing a coordinator inside a children. This call is important to prevent memory leak. | ||
/// - Parameter coordinator: Coordinator that finished. | ||
func childDidFinish(_ coordinator : Coordinator){ | ||
// Call this if a coordinator is done. | ||
for (index, child) in children.enumerated() { | ||
if child === coordinator { | ||
children.remove(at: index) | ||
break | ||
} | ||
} | ||
} | ||
} |
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
13 changes: 13 additions & 0 deletions
13
LionHeart-iOS/LionHeart-iOS/Network/Manager/MangerInterface/ArticleDetailManager.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,13 @@ | ||
// | ||
// ArticleDetailManager.swift | ||
// LionHeart-iOS | ||
// | ||
// Created by uiskim on 2023/10/14. | ||
// | ||
|
||
import Foundation | ||
|
||
protocol ArticleDetailManager { | ||
func getArticleDetail(articleId: Int) async throws -> [BlockTypeAppData] | ||
func postBookmark(model: BookmarkRequest) async throws | ||
} |
13 changes: 13 additions & 0 deletions
13
...eart-iOS/LionHeart-iOS/Network/Manager/MangerInterface/ArticleListByCategoryManager.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,13 @@ | ||
// | ||
// ArticleListByCategoryManager.swift | ||
// LionHeart-iOS | ||
// | ||
// Created by uiskim on 2023/10/14. | ||
// | ||
|
||
import Foundation | ||
|
||
protocol ArticleListByCategoryManager { | ||
func getArticleListByCategory(categoryString: String) async throws -> CurriculumWeekData | ||
func postBookmark(model: BookmarkRequest) async throws | ||
} |
13 changes: 13 additions & 0 deletions
13
LionHeart-iOS/LionHeart-iOS/Network/Manager/MangerInterface/BookmarkManager.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,13 @@ | ||
// | ||
// BookmarkManager.swift | ||
// LionHeart-iOS | ||
// | ||
// Created by uiskim on 2023/10/14. | ||
// | ||
|
||
import Foundation | ||
|
||
protocol BookmarkManager { | ||
func getBookmark() async throws -> BookmarkAppData | ||
func postBookmark(model: BookmarkRequest) async throws | ||
} |
12 changes: 12 additions & 0 deletions
12
LionHeart-iOS/LionHeart-iOS/Network/Manager/MangerInterface/ChallengeManager.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,12 @@ | ||
// | ||
// ChallengeManager.swift | ||
// LionHeart-iOS | ||
// | ||
// Created by uiskim on 2023/10/14. | ||
// | ||
|
||
import Foundation | ||
|
||
protocol ChallengeManager { | ||
func inquireChallengeInfo() async throws -> ChallengeData | ||
} |
13 changes: 13 additions & 0 deletions
13
LionHeart-iOS/LionHeart-iOS/Network/Manager/MangerInterface/CurriculumListManager.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,13 @@ | ||
// | ||
// CurriculumListManager.swift | ||
// LionHeart-iOS | ||
// | ||
// Created by uiskim on 2023/10/14. | ||
// | ||
|
||
import Foundation | ||
|
||
protocol CurriculumListManager { | ||
func postBookmark(model: BookmarkRequest) async throws | ||
func getArticleListByWeekInfo(week: Int) async throws -> CurriculumWeekData | ||
} |
12 changes: 12 additions & 0 deletions
12
LionHeart-iOS/LionHeart-iOS/Network/Manager/MangerInterface/CurriculumManager.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,12 @@ | ||
// | ||
// CurriculumManager.swift | ||
// LionHeart-iOS | ||
// | ||
// Created by uiskim on 2023/10/14. | ||
// | ||
|
||
import Foundation | ||
|
||
protocol CurriculumManager { | ||
func getCurriculumServiceInfo() async throws -> UserInfoData | ||
} |
12 changes: 12 additions & 0 deletions
12
LionHeart-iOS/LionHeart-iOS/Network/Manager/MangerInterface/LoginManager.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,12 @@ | ||
// | ||
// LoginManager.swift | ||
// LionHeart-iOS | ||
// | ||
// Created by uiskim on 2023/10/14. | ||
// | ||
|
||
import Foundation | ||
|
||
protocol LoginManager { | ||
func login(type: LoginType, kakaoToken: String) async throws | ||
} |
14 changes: 14 additions & 0 deletions
14
LionHeart-iOS/LionHeart-iOS/Network/Manager/MangerInterface/MyPageManager.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,14 @@ | ||
// | ||
// MyPageManager.swift | ||
// LionHeart-iOS | ||
// | ||
// Created by uiskim on 2023/10/14. | ||
// | ||
|
||
import Foundation | ||
|
||
protocol MyPageManager { | ||
func getMyPage() async throws -> BadgeProfileAppData | ||
func resignUser() async throws | ||
func logout(token: UserDefaultToken) async throws | ||
} |
12 changes: 12 additions & 0 deletions
12
LionHeart-iOS/LionHeart-iOS/Network/Manager/MangerInterface/OnboardingManager.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,12 @@ | ||
// | ||
// OnboardingManager.swift | ||
// LionHeart-iOS | ||
// | ||
// Created by uiskim on 2023/10/14. | ||
// | ||
|
||
import Foundation | ||
|
||
protocol OnboardingManager { | ||
func signUp(type: LoginType, onboardingModel: UserOnboardingModel) async throws | ||
} |
13 changes: 13 additions & 0 deletions
13
LionHeart-iOS/LionHeart-iOS/Network/Manager/MangerInterface/SplashManager.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,13 @@ | ||
// | ||
// SplashManager.swift | ||
// LionHeart-iOS | ||
// | ||
// Created by uiskim on 2023/10/14. | ||
// | ||
|
||
import Foundation | ||
|
||
protocol SplashManager { | ||
func reissueToken(token: Token) async throws -> Token? | ||
func logout(token: UserDefaultToken) async throws | ||
} |
12 changes: 12 additions & 0 deletions
12
LionHeart-iOS/LionHeart-iOS/Network/Manager/MangerInterface/TodayManager.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,12 @@ | ||
// | ||
// TodayManager.swift | ||
// LionHeart-iOS | ||
// | ||
// Created by uiskim on 2023/10/14. | ||
// | ||
|
||
import Foundation | ||
|
||
protocol TodayManager { | ||
func inquiryTodayArticle() async throws -> TodayArticle | ||
} |
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.