From 6f3afb4d75cfc2c90cfd4ace5051b42510c2cef4 Mon Sep 17 00:00:00 2001 From: GeonH0 Date: Mon, 8 Jul 2024 23:22:22 +0900 Subject: [PATCH] =?UTF-8?q?Fix:=20RecipeDetailError=EB=A1=9C=20=EB=84=A4?= =?UTF-8?q?=EC=9D=B4=EB=B0=8D=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../HomeCafeRecipes.xcodeproj/project.pbxproj | 188 +++++++++++++----- .../Network/RecipeDetailFetchService.swift | 6 +- .../Domain/Entities/RecipeError.swift | 4 +- 3 files changed, 141 insertions(+), 57 deletions(-) diff --git a/HomeCafeRecipes/HomeCafeRecipes.xcodeproj/project.pbxproj b/HomeCafeRecipes/HomeCafeRecipes.xcodeproj/project.pbxproj index b1eecef..c0ef8ae 100644 --- a/HomeCafeRecipes/HomeCafeRecipes.xcodeproj/project.pbxproj +++ b/HomeCafeRecipes/HomeCafeRecipes.xcodeproj/project.pbxproj @@ -9,15 +9,12 @@ /* Begin PBXBuildFile section */ 1D1283A22C15E94300C5A870 /* Recipe.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D1283A12C15E94300C5A870 /* Recipe.swift */; }; 1D1283A42C15EA8100C5A870 /* RecipeType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D1283A32C15EA8100C5A870 /* RecipeType.swift */; }; - 1D1283A62C15EAA600C5A870 /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D1283A52C15EAA600C5A870 /* User.swift */; }; - 1D1283A82C15EABB00C5A870 /* Comment.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D1283A72C15EABB00C5A870 /* Comment.swift */; }; 1D1283AA2C15EBCF00C5A870 /* SearchFeedUseCase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D1283A92C15EBCF00C5A870 /* SearchFeedUseCase.swift */; }; 1D1283AC2C15EBE600C5A870 /* FetchFeedListUseCase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D1283AB2C15EBE600C5A870 /* FetchFeedListUseCase.swift */; }; 1D1283AF2C1697DB00C5A870 /* RxCocoa in Frameworks */ = {isa = PBXBuildFile; productRef = 1D1283AE2C1697DB00C5A870 /* RxCocoa */; }; 1D1283B12C1697DB00C5A870 /* RxSwift in Frameworks */ = {isa = PBXBuildFile; productRef = 1D1283B02C1697DB00C5A870 /* RxSwift */; }; 1D1283B42C16983900C5A870 /* RxSwift in Frameworks */ = {isa = PBXBuildFile; productRef = 1D1283B32C16983900C5A870 /* RxSwift */; }; 1D1283B62C16984E00C5A870 /* RxCocoa in Frameworks */ = {isa = PBXBuildFile; productRef = 1D1283B52C16984E00C5A870 /* RxCocoa */; }; - 1D1283C82C16CE7C00C5A870 /* DateFormatter+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D1283C72C16CE7C00C5A870 /* DateFormatter+Extensions.swift */; }; 1D1283CA2C16D9C600C5A870 /* RecipeFetchService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D1283C92C16D9C600C5A870 /* RecipeFetchService.swift */; }; 1D2C16E62BE532B700C04508 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D2C16E52BE532B700C04508 /* AppDelegate.swift */; }; 1D2C16EA2BE532B700C04508 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D2C16E92BE532B700C04508 /* ViewController.swift */; }; @@ -28,14 +25,30 @@ 1D4741D22C1B4F8D009381CE /* RecipeDTO.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D4741CD2C1B4F8D009381CE /* RecipeDTO.swift */; }; 1D4741D32C1B4F8D009381CE /* RecipePageDTO.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D4741CE2C1B4F8D009381CE /* RecipePageDTO.swift */; }; 1D4741D42C1B4F8D009381CE /* NetworkResponseDTO.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D4741CF2C1B4F8D009381CE /* NetworkResponseDTO.swift */; }; - 1D4741D52C1B4F8D009381CE /* UserDTO.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D4741D02C1B4F8D009381CE /* UserDTO.swift */; }; - 1DDFFD812C1C096A0083B077 /* RecipeMapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1DDFFD802C1C096A0083B077 /* RecipeMapper.swift */; }; + 1D7368B72C3442C8000EF904 /* String+Validation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D7368B52C3442C8000EF904 /* String+Validation.swift */; }; + 1D7368B82C3442C8000EF904 /* UIImageViewImageLoading.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D7368B62C3442C8000EF904 /* UIImageViewImageLoading.swift */; }; + 1D7368BA2C3442DE000EF904 /* RecipeListMapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D7368B92C3442DE000EF904 /* RecipeListMapper.swift */; }; + 1D7368C72C344378000EF904 /* UserDTO.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D7368C62C344378000EF904 /* UserDTO.swift */; }; + 1D7368CA2C3443A1000EF904 /* Comment.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D7368C82C3443A1000EF904 /* Comment.swift */; }; + 1D7368CB2C3443A1000EF904 /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D7368C92C3443A1000EF904 /* User.swift */; }; + 1D7368CE2C344403000EF904 /* DateFormatter+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D7368CD2C344403000EF904 /* DateFormatter+Extensions.swift */; }; + 1D7368D22C34FADD000EF904 /* FetchRecipeDetailUseCase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D7368D12C34FADD000EF904 /* FetchRecipeDetailUseCase.swift */; }; + 1D7368D42C34FAE8000EF904 /* RecipeDetailInteractor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D7368D32C34FAE8000EF904 /* RecipeDetailInteractor.swift */; }; + 1D7368D62C34FAF9000EF904 /* RecipeDetailFetchService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D7368D52C34FAF9000EF904 /* RecipeDetailFetchService.swift */; }; + 1D7368D82C34FB07000EF904 /* RecipeDetailDTO.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D7368D72C34FB07000EF904 /* RecipeDetailDTO.swift */; }; + 1D7368DA2C34FB14000EF904 /* RecipeDetailRepository.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D7368D92C34FB14000EF904 /* RecipeDetailRepository.swift */; }; + 1D7368DC2C34FB32000EF904 /* CustomNavigationBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D7368DB2C34FB32000EF904 /* CustomNavigationBar.swift */; }; + 1D7368E22C34FB38000EF904 /* RecipeDetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D7368DF2C34FB38000EF904 /* RecipeDetailViewController.swift */; }; + 1D7368E32C34FB38000EF904 /* RecipeDetailView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D7368E02C34FB38000EF904 /* RecipeDetailView.swift */; }; + 1D7368E42C34FB38000EF904 /* RecipeDetailViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D7368E12C34FB38000EF904 /* RecipeDetailViewModel.swift */; }; + 1D7368E72C34FB66000EF904 /* RecipeDetailCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D7368E62C34FB66000EF904 /* RecipeDetailCoordinator.swift */; }; + 1D7368EA2C34FBF7000EF904 /* MainTabBarController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D7368E92C34FBF7000EF904 /* MainTabBarController.swift */; }; + 1D95A0A42C37B0E200F09077 /* Fonts.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D95A0A32C37B0E200F09077 /* Fonts.swift */; }; + 1D95A0A82C37C7D400F09077 /* RecipeError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D95A0A72C37C7D400F09077 /* RecipeError.swift */; }; 1DE19E9D2C1B3DC10031804A /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1DE19E9C2C1B3DC10031804A /* SceneDelegate.swift */; }; 1DE19EA72C1B420A0031804A /* FeedListRepository.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1DE19EA52C1B420A0031804A /* FeedListRepository.swift */; }; 1DE19EA82C1B420A0031804A /* SearchFeedListRepository.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1DE19EA62C1B420A0031804A /* SearchFeedListRepository.swift */; }; 1DE19EB12C1B42200031804A /* NetworkService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1DE19EB02C1B42200031804A /* NetworkService.swift */; }; - 1DE19EBF2C1B422F0031804A /* RecipeItemViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1DE19EB42C1B422F0031804A /* RecipeItemViewModel.swift */; }; - 1DE19EC02C1B422F0031804A /* RecipeDetailView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1DE19EB62C1B422F0031804A /* RecipeDetailView.swift */; }; 1DE19EC22C1B422F0031804A /* RecipeListItemViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1DE19EBA2C1B422F0031804A /* RecipeListItemViewModel.swift */; }; 1DE19EC32C1B422F0031804A /* SearchBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1DE19EBB2C1B422F0031804A /* SearchBar.swift */; }; 1DE19EC42C1B422F0031804A /* RecipeListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1DE19EBC2C1B422F0031804A /* RecipeListViewController.swift */; }; @@ -65,11 +78,8 @@ /* Begin PBXFileReference section */ 1D1283A12C15E94300C5A870 /* Recipe.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Recipe.swift; sourceTree = ""; }; 1D1283A32C15EA8100C5A870 /* RecipeType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RecipeType.swift; sourceTree = ""; }; - 1D1283A52C15EAA600C5A870 /* User.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = User.swift; sourceTree = ""; }; - 1D1283A72C15EABB00C5A870 /* Comment.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Comment.swift; sourceTree = ""; }; 1D1283A92C15EBCF00C5A870 /* SearchFeedUseCase.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchFeedUseCase.swift; sourceTree = ""; }; 1D1283AB2C15EBE600C5A870 /* FetchFeedListUseCase.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FetchFeedListUseCase.swift; sourceTree = ""; }; - 1D1283C72C16CE7C00C5A870 /* DateFormatter+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "DateFormatter+Extensions.swift"; sourceTree = ""; }; 1D1283C92C16D9C600C5A870 /* RecipeFetchService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RecipeFetchService.swift; sourceTree = ""; }; 1D2C16E22BE532B700C04508 /* HomeCafeRecipes.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = HomeCafeRecipes.app; sourceTree = BUILT_PRODUCTS_DIR; }; 1D2C16E52BE532B700C04508 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; @@ -86,14 +96,30 @@ 1D4741CD2C1B4F8D009381CE /* RecipeDTO.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RecipeDTO.swift; sourceTree = ""; }; 1D4741CE2C1B4F8D009381CE /* RecipePageDTO.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RecipePageDTO.swift; sourceTree = ""; }; 1D4741CF2C1B4F8D009381CE /* NetworkResponseDTO.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NetworkResponseDTO.swift; sourceTree = ""; }; - 1D4741D02C1B4F8D009381CE /* UserDTO.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UserDTO.swift; sourceTree = ""; }; - 1DDFFD802C1C096A0083B077 /* RecipeMapper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RecipeMapper.swift; sourceTree = ""; }; + 1D7368B52C3442C8000EF904 /* String+Validation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "String+Validation.swift"; sourceTree = ""; }; + 1D7368B62C3442C8000EF904 /* UIImageViewImageLoading.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UIImageViewImageLoading.swift; sourceTree = ""; }; + 1D7368B92C3442DE000EF904 /* RecipeListMapper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RecipeListMapper.swift; sourceTree = ""; }; + 1D7368C62C344378000EF904 /* UserDTO.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UserDTO.swift; sourceTree = ""; }; + 1D7368C82C3443A1000EF904 /* Comment.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Comment.swift; sourceTree = ""; }; + 1D7368C92C3443A1000EF904 /* User.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = User.swift; sourceTree = ""; }; + 1D7368CD2C344403000EF904 /* DateFormatter+Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "DateFormatter+Extensions.swift"; sourceTree = ""; }; + 1D7368D12C34FADD000EF904 /* FetchRecipeDetailUseCase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FetchRecipeDetailUseCase.swift; sourceTree = ""; }; + 1D7368D32C34FAE8000EF904 /* RecipeDetailInteractor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RecipeDetailInteractor.swift; sourceTree = ""; }; + 1D7368D52C34FAF9000EF904 /* RecipeDetailFetchService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RecipeDetailFetchService.swift; sourceTree = ""; }; + 1D7368D72C34FB07000EF904 /* RecipeDetailDTO.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RecipeDetailDTO.swift; sourceTree = ""; }; + 1D7368D92C34FB14000EF904 /* RecipeDetailRepository.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RecipeDetailRepository.swift; sourceTree = ""; }; + 1D7368DB2C34FB32000EF904 /* CustomNavigationBar.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CustomNavigationBar.swift; sourceTree = ""; }; + 1D7368DF2C34FB38000EF904 /* RecipeDetailViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RecipeDetailViewController.swift; sourceTree = ""; }; + 1D7368E02C34FB38000EF904 /* RecipeDetailView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RecipeDetailView.swift; sourceTree = ""; }; + 1D7368E12C34FB38000EF904 /* RecipeDetailViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RecipeDetailViewModel.swift; sourceTree = ""; }; + 1D7368E62C34FB66000EF904 /* RecipeDetailCoordinator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RecipeDetailCoordinator.swift; sourceTree = ""; }; + 1D7368E92C34FBF7000EF904 /* MainTabBarController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MainTabBarController.swift; sourceTree = ""; }; + 1D95A0A32C37B0E200F09077 /* Fonts.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Fonts.swift; sourceTree = ""; }; + 1D95A0A72C37C7D400F09077 /* RecipeError.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RecipeError.swift; sourceTree = ""; }; 1DE19E9C2C1B3DC10031804A /* SceneDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; 1DE19EA52C1B420A0031804A /* FeedListRepository.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FeedListRepository.swift; sourceTree = ""; }; 1DE19EA62C1B420A0031804A /* SearchFeedListRepository.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SearchFeedListRepository.swift; sourceTree = ""; }; 1DE19EB02C1B42200031804A /* NetworkService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NetworkService.swift; sourceTree = ""; }; - 1DE19EB42C1B422F0031804A /* RecipeItemViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RecipeItemViewModel.swift; sourceTree = ""; }; - 1DE19EB62C1B422F0031804A /* RecipeDetailView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RecipeDetailView.swift; sourceTree = ""; }; 1DE19EBA2C1B422F0031804A /* RecipeListItemViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RecipeListItemViewModel.swift; sourceTree = ""; }; 1DE19EBB2C1B422F0031804A /* SearchBar.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SearchBar.swift; sourceTree = ""; }; 1DE19EBC2C1B422F0031804A /* RecipeListViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RecipeListViewController.swift; sourceTree = ""; }; @@ -135,10 +161,11 @@ 1D12839F2C15E7A700C5A870 /* Entities */ = { isa = PBXGroup; children = ( + 1D95A0A72C37C7D400F09077 /* RecipeError.swift */, 1D1283A12C15E94300C5A870 /* Recipe.swift */, + 1D7368C82C3443A1000EF904 /* Comment.swift */, + 1D7368C92C3443A1000EF904 /* User.swift */, 1D1283A32C15EA8100C5A870 /* RecipeType.swift */, - 1D1283A52C15EAA600C5A870 /* User.swift */, - 1D1283A72C15EABB00C5A870 /* Comment.swift */, ); path = Entities; sourceTree = ""; @@ -147,6 +174,7 @@ isa = PBXGroup; children = ( 1D1283A92C15EBCF00C5A870 /* SearchFeedUseCase.swift */, + 1D7368D12C34FADD000EF904 /* FetchRecipeDetailUseCase.swift */, 1D1283AB2C15EBE600C5A870 /* FetchFeedListUseCase.swift */, ); path = UseCases; @@ -173,19 +201,12 @@ children = ( 1D4741CB2C1B4F8D009381CE /* DTO */, 1D1283C92C16D9C600C5A870 /* RecipeFetchService.swift */, + 1D7368D52C34FAF9000EF904 /* RecipeDetailFetchService.swift */, 1DE19EB02C1B42200031804A /* NetworkService.swift */, ); path = Network; sourceTree = ""; }; - 1D1283C62C16CD9200C5A870 /* Utilities */ = { - isa = PBXGroup; - children = ( - 1D1283C72C16CE7C00C5A870 /* DateFormatter+Extensions.swift */, - ); - path = Utilities; - sourceTree = ""; - }; 1D2C16D92BE532B700C04508 = { isa = PBXGroup; children = ( @@ -211,8 +232,11 @@ 1D2C16E42BE532B700C04508 /* HomeCafeRecipes */ = { isa = PBXGroup; children = ( + 1D95A0A22C37B0E200F09077 /* Resources */, + 1D7368E52C34FB66000EF904 /* Coordinators */, + 1D7368CC2C344403000EF904 /* Utilities */, + 1D7368B42C3442C8000EF904 /* Extensions */, 1DE19EB22C1B422F0031804A /* Presentation */, - 1D1283C62C16CD9200C5A870 /* Utilities */, 1D1283AD2C16974B00C5A870 /* Data */, 1D740B402C15E6680001B704 /* Domain */, 1D2C16E52BE532B700C04508 /* AppDelegate.swift */, @@ -245,15 +269,67 @@ 1D4741CB2C1B4F8D009381CE /* DTO */ = { isa = PBXGroup; children = ( + 1D7368C62C344378000EF904 /* UserDTO.swift */, 1D4741CC2C1B4F8D009381CE /* RecipeImageDTO.swift */, 1D4741CD2C1B4F8D009381CE /* RecipeDTO.swift */, + 1D7368D72C34FB07000EF904 /* RecipeDetailDTO.swift */, 1D4741CE2C1B4F8D009381CE /* RecipePageDTO.swift */, 1D4741CF2C1B4F8D009381CE /* NetworkResponseDTO.swift */, - 1D4741D02C1B4F8D009381CE /* UserDTO.swift */, ); path = DTO; sourceTree = ""; }; + 1D7368B42C3442C8000EF904 /* Extensions */ = { + isa = PBXGroup; + children = ( + 1D7368B52C3442C8000EF904 /* String+Validation.swift */, + 1D7368B62C3442C8000EF904 /* UIImageViewImageLoading.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + 1D7368CC2C344403000EF904 /* Utilities */ = { + isa = PBXGroup; + children = ( + 1D7368CD2C344403000EF904 /* DateFormatter+Extensions.swift */, + ); + path = Utilities; + sourceTree = ""; + }; + 1D7368DD2C34FB38000EF904 /* Feed */ = { + isa = PBXGroup; + children = ( + 1D7368DE2C34FB38000EF904 /* View */, + 1D7368E12C34FB38000EF904 /* RecipeDetailViewModel.swift */, + ); + path = Feed; + sourceTree = ""; + }; + 1D7368DE2C34FB38000EF904 /* View */ = { + isa = PBXGroup; + children = ( + 1D7368DF2C34FB38000EF904 /* RecipeDetailViewController.swift */, + 1D7368E02C34FB38000EF904 /* RecipeDetailView.swift */, + ); + path = View; + sourceTree = ""; + }; + 1D7368E52C34FB66000EF904 /* Coordinators */ = { + isa = PBXGroup; + children = ( + 1D7368E62C34FB66000EF904 /* RecipeDetailCoordinator.swift */, + ); + path = Coordinators; + sourceTree = ""; + }; + 1D7368E82C34FBF7000EF904 /* Tabbar */ = { + isa = PBXGroup; + children = ( + 1D7368E92C34FBF7000EF904 /* MainTabBarController.swift */, + ); + path = Tabbar; + sourceTree = ""; + }; 1D740B402C15E6680001B704 /* Domain */ = { isa = PBXGroup; children = ( @@ -264,10 +340,18 @@ path = Domain; sourceTree = ""; }; + 1D95A0A22C37B0E200F09077 /* Resources */ = { + isa = PBXGroup; + children = ( + 1D95A0A32C37B0E200F09077 /* Fonts.swift */, + ); + path = Resources; + sourceTree = ""; + }; 1DDFFD822C1C09AB0083B077 /* Mapper */ = { isa = PBXGroup; children = ( - 1DDFFD802C1C096A0083B077 /* RecipeMapper.swift */, + 1D7368B92C3442DE000EF904 /* RecipeListMapper.swift */, ); path = Mapper; sourceTree = ""; @@ -276,6 +360,7 @@ isa = PBXGroup; children = ( 1DE19EA52C1B420A0031804A /* FeedListRepository.swift */, + 1D7368D92C34FB14000EF904 /* RecipeDetailRepository.swift */, 1DE19EA62C1B420A0031804A /* SearchFeedListRepository.swift */, ); path = Repositories; @@ -284,30 +369,15 @@ 1DE19EB22C1B422F0031804A /* Presentation */ = { isa = PBXGroup; children = ( + 1D7368E82C34FBF7000EF904 /* Tabbar */, + 1D7368DD2C34FB38000EF904 /* Feed */, + 1D7368DB2C34FB32000EF904 /* CustomNavigationBar.swift */, 1DDFFD822C1C09AB0083B077 /* Mapper */, - 1DE19EB32C1B422F0031804A /* Feed */, 1DE19EB72C1B422F0031804A /* FeedList */, ); path = Presentation; sourceTree = ""; }; - 1DE19EB32C1B422F0031804A /* Feed */ = { - isa = PBXGroup; - children = ( - 1DE19EB42C1B422F0031804A /* RecipeItemViewModel.swift */, - 1DE19EB52C1B422F0031804A /* View */, - ); - path = Feed; - sourceTree = ""; - }; - 1DE19EB52C1B422F0031804A /* View */ = { - isa = PBXGroup; - children = ( - 1DE19EB62C1B422F0031804A /* RecipeDetailView.swift */, - ); - path = View; - sourceTree = ""; - }; 1DE19EB72C1B422F0031804A /* FeedList */ = { isa = PBXGroup; children = ( @@ -331,6 +401,7 @@ 1DF829AF2C299F1F00C337FC /* Interactor */ = { isa = PBXGroup; children = ( + 1D7368D32C34FAE8000EF904 /* RecipeDetailInteractor.swift */, 1DF829B02C299F1F00C337FC /* RecipeListInteractor.swift */, ); path = Interactor; @@ -479,32 +550,45 @@ files = ( 1DF829B12C299F1F00C337FC /* RecipeListInteractor.swift in Sources */, 1D2C16EA2BE532B700C04508 /* ViewController.swift in Sources */, + 1D7368EA2C34FBF7000EF904 /* MainTabBarController.swift in Sources */, + 1D7368D42C34FAE8000EF904 /* RecipeDetailInteractor.swift in Sources */, 1DE19EC52C1B422F0031804A /* RecipeListView.swift in Sources */, + 1D7368CB2C3443A1000EF904 /* User.swift in Sources */, 1D4741D32C1B4F8D009381CE /* RecipePageDTO.swift in Sources */, + 1D7368CE2C344403000EF904 /* DateFormatter+Extensions.swift in Sources */, + 1D7368E32C34FB38000EF904 /* RecipeDetailView.swift in Sources */, 1D2C16E62BE532B700C04508 /* AppDelegate.swift in Sources */, 1DE19EB12C1B42200031804A /* NetworkService.swift in Sources */, - 1D1283A62C15EAA600C5A870 /* User.swift in Sources */, 1D1283AC2C15EBE600C5A870 /* FetchFeedListUseCase.swift in Sources */, - 1D1283A82C15EABB00C5A870 /* Comment.swift in Sources */, - 1D1283C82C16CE7C00C5A870 /* DateFormatter+Extensions.swift in Sources */, + 1D7368E22C34FB38000EF904 /* RecipeDetailViewController.swift in Sources */, 1D1283A42C15EA8100C5A870 /* RecipeType.swift in Sources */, + 1D7368D82C34FB07000EF904 /* RecipeDetailDTO.swift in Sources */, + 1D7368DA2C34FB14000EF904 /* RecipeDetailRepository.swift in Sources */, 1D4741D22C1B4F8D009381CE /* RecipeDTO.swift in Sources */, - 1DE19EC02C1B422F0031804A /* RecipeDetailView.swift in Sources */, 1D1283AA2C15EBCF00C5A870 /* SearchFeedUseCase.swift in Sources */, 1DE19EA82C1B420A0031804A /* SearchFeedListRepository.swift in Sources */, - 1D4741D52C1B4F8D009381CE /* UserDTO.swift in Sources */, + 1D95A0A42C37B0E200F09077 /* Fonts.swift in Sources */, 1DE19EC22C1B422F0031804A /* RecipeListItemViewModel.swift in Sources */, + 1D7368C72C344378000EF904 /* UserDTO.swift in Sources */, 1DE19EC32C1B422F0031804A /* SearchBar.swift in Sources */, 1DE19E9D2C1B3DC10031804A /* SceneDelegate.swift in Sources */, 1D4741D12C1B4F8D009381CE /* RecipeImageDTO.swift in Sources */, 1DE19EA72C1B420A0031804A /* FeedListRepository.swift in Sources */, 1DE19EC62C1B422F0031804A /* RecipeListCell.swift in Sources */, - 1DDFFD812C1C096A0083B077 /* RecipeMapper.swift in Sources */, + 1D7368E72C34FB66000EF904 /* RecipeDetailCoordinator.swift in Sources */, + 1D7368D22C34FADD000EF904 /* FetchRecipeDetailUseCase.swift in Sources */, 1DE19EC42C1B422F0031804A /* RecipeListViewController.swift in Sources */, - 1DE19EBF2C1B422F0031804A /* RecipeItemViewModel.swift in Sources */, + 1D7368D62C34FAF9000EF904 /* RecipeDetailFetchService.swift in Sources */, + 1D95A0A82C37C7D400F09077 /* RecipeError.swift in Sources */, 1D1283A22C15E94300C5A870 /* Recipe.swift in Sources */, + 1D7368BA2C3442DE000EF904 /* RecipeListMapper.swift in Sources */, + 1D7368CA2C3443A1000EF904 /* Comment.swift in Sources */, 1D1283CA2C16D9C600C5A870 /* RecipeFetchService.swift in Sources */, + 1D7368E42C34FB38000EF904 /* RecipeDetailViewModel.swift in Sources */, + 1D7368B82C3442C8000EF904 /* UIImageViewImageLoading.swift in Sources */, 1D4741D42C1B4F8D009381CE /* NetworkResponseDTO.swift in Sources */, + 1D7368B72C3442C8000EF904 /* String+Validation.swift in Sources */, + 1D7368DC2C34FB32000EF904 /* CustomNavigationBar.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/HomeCafeRecipes/HomeCafeRecipes/Data/Network/RecipeDetailFetchService.swift b/HomeCafeRecipes/HomeCafeRecipes/Data/Network/RecipeDetailFetchService.swift index e3f1ec7..d1e0321 100644 --- a/HomeCafeRecipes/HomeCafeRecipes/Data/Network/RecipeDetailFetchService.swift +++ b/HomeCafeRecipes/HomeCafeRecipes/Data/Network/RecipeDetailFetchService.swift @@ -26,15 +26,15 @@ final class RecipeDetailFetchServiceImpl: RecipeDetailFetchService { func fetchRecipeDetail(recipeID: Int) -> Single { guard let url = makeURL(recipeID: recipeID) else { - return Single.error(RecipeError.invalidURL) + return Single.error(RecipeDetailError.invalidURL) } return networkService.getRequest(url: url, responseType: NetworkResponseDTO.self) .map { $0.data.toDomain() } .catch { error in guard let decodingError = error as? DecodingError else { - return Single.error(RecipeError.networkError(error)) + return Single.error(RecipeDetailError.networkError(error)) } - return Single.error(RecipeError.decodingError) + return Single.error(RecipeDetailError.decodingError) } } } diff --git a/HomeCafeRecipes/HomeCafeRecipes/Domain/Entities/RecipeError.swift b/HomeCafeRecipes/HomeCafeRecipes/Domain/Entities/RecipeError.swift index fbb4c94..8070905 100644 --- a/HomeCafeRecipes/HomeCafeRecipes/Domain/Entities/RecipeError.swift +++ b/HomeCafeRecipes/HomeCafeRecipes/Domain/Entities/RecipeError.swift @@ -7,14 +7,14 @@ import Foundation -enum RecipeError: Error { +enum RecipeDetailError: Error { case invalidURL case networkError(Error) case decodingError case unknownError } -extension RecipeError: LocalizedError { +extension RecipeDetailError: LocalizedError { var errorDescription: String? { switch self { case .invalidURL: