Skip to content

Commit

Permalink
[Merge]
Browse files Browse the repository at this point in the history
  • Loading branch information
yungu0010 committed Jan 8, 2024
2 parents ade4d87 + 7125482 commit b46df06
Show file tree
Hide file tree
Showing 34 changed files with 1,005 additions and 648 deletions.
16 changes: 12 additions & 4 deletions iOS-NOTTODO/iOS-NOTTODO.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,12 @@
0943A9F92A53239200614761 /* Bundle+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0943A9F82A53239200614761 /* Bundle+.swift */; };
09582B4829BDA7F600EF3207 /* DetailStackView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09582B4729BDA7F600EF3207 /* DetailStackView.swift */; };
09582B4B29BDE37C00EF3207 /* DetailFooterReusableView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09582B4A29BDE37C00EF3207 /* DetailFooterReusableView.swift */; };
09582B4D29BE277800EF3207 /* DetailHeaderReusableView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09582B4C29BE277800EF3207 /* DetailHeaderReusableView.swift */; };
09582B4D29BE277800EF3207 /* DetailHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09582B4C29BE277800EF3207 /* DetailHeaderView.swift */; };
09582B4F29BEBAFA00EF3207 /* DetailCalendarViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09582B4E29BEBAFA00EF3207 /* DetailCalendarViewController.swift */; };
09582B5129C0BC3600EF3207 /* DetailAchievementViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09582B5029C0BC3600EF3207 /* DetailAchievementViewController.swift */; };
0960C0D42A38BC6500A3D8DB /* KeychainUtil.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0960C0D32A38BC6500A3D8DB /* KeychainUtil.swift */; };
0960C0D62A38BC8100A3D8DB /* DefaultKeys.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0960C0D52A38BC8100A3D8DB /* DefaultKeys.swift */; };
0964BA4A2B0F6BFB00A8984B /* AuthInterceptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0964BA492B0F6BFB00A8984B /* AuthInterceptor.swift */; };
097568362A2FEF630001EC46 /* String+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 097568352A2FEF3F0001EC46 /* String+.swift */; };
097C003629AB8270008CAEF3 /* MissionListCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 097C003529AB8270008CAEF3 /* MissionListCollectionViewCell.swift */; };
0982DE5429ADCCE000D933D2 /* HomeEmptyCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0982DE5329ADCCE000D933D2 /* HomeEmptyCollectionViewCell.swift */; };
Expand All @@ -45,6 +46,7 @@
09A1465F2A192C4900DDC308 /* WeekMissionResponseDTO.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09A1465E2A192C4900DDC308 /* WeekMissionResponseDTO.swift */; };
09A146652A1964B500DDC308 /* AddAnotherDayResponseDTO.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09A146642A19649A00DDC308 /* AddAnotherDayResponseDTO.swift */; };
09C8602D2AB14B4800C4F4B1 /* FSCalendar in Frameworks */ = {isa = PBXBuildFile; productRef = 09C8602C2AB14B4800C4F4B1 /* FSCalendar */; };
09CF56042B09F23800526C8C /* HomeDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09CF56032B09F23800526C8C /* HomeDataSource.swift */; };
09DCCD1F2A18ED76003DCF8A /* DailyMissionResponseDTO.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09DCCD1E2A18ED76003DCF8A /* DailyMissionResponseDTO.swift */; };
09DCCD212A18EF43003DCF8A /* HomeSevice.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09DCCD202A18EF43003DCF8A /* HomeSevice.swift */; };
09DCCD232A18EFB0003DCF8A /* HomeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09DCCD222A18EFB0003DCF8A /* HomeAPI.swift */; };
Expand Down Expand Up @@ -185,11 +187,12 @@
0943A9F82A53239200614761 /* Bundle+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Bundle+.swift"; sourceTree = "<group>"; };
09582B4729BDA7F600EF3207 /* DetailStackView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DetailStackView.swift; sourceTree = "<group>"; };
09582B4A29BDE37C00EF3207 /* DetailFooterReusableView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DetailFooterReusableView.swift; sourceTree = "<group>"; };
09582B4C29BE277800EF3207 /* DetailHeaderReusableView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DetailHeaderReusableView.swift; sourceTree = "<group>"; };
09582B4C29BE277800EF3207 /* DetailHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DetailHeaderView.swift; sourceTree = "<group>"; };
09582B4E29BEBAFA00EF3207 /* DetailCalendarViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DetailCalendarViewController.swift; sourceTree = "<group>"; };
09582B5029C0BC3600EF3207 /* DetailAchievementViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DetailAchievementViewController.swift; sourceTree = "<group>"; };
0960C0D32A38BC6500A3D8DB /* KeychainUtil.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeychainUtil.swift; sourceTree = "<group>"; };
0960C0D52A38BC8100A3D8DB /* DefaultKeys.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DefaultKeys.swift; sourceTree = "<group>"; };
0964BA492B0F6BFB00A8984B /* AuthInterceptor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AuthInterceptor.swift; sourceTree = "<group>"; };
097568352A2FEF3F0001EC46 /* String+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "String+.swift"; sourceTree = "<group>"; };
097C003529AB8270008CAEF3 /* MissionListCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MissionListCollectionViewCell.swift; sourceTree = "<group>"; };
0982DE5329ADCCE000D933D2 /* HomeEmptyCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeEmptyCollectionViewCell.swift; sourceTree = "<group>"; };
Expand All @@ -204,6 +207,7 @@
099FC98829B3233D005B37E6 /* CalendarView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CalendarView.swift; sourceTree = "<group>"; };
09A1465E2A192C4900DDC308 /* WeekMissionResponseDTO.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WeekMissionResponseDTO.swift; sourceTree = "<group>"; };
09A146642A19649A00DDC308 /* AddAnotherDayResponseDTO.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddAnotherDayResponseDTO.swift; sourceTree = "<group>"; };
09CF56032B09F23800526C8C /* HomeDataSource.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeDataSource.swift; sourceTree = "<group>"; };
09DCCD1E2A18ED76003DCF8A /* DailyMissionResponseDTO.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DailyMissionResponseDTO.swift; sourceTree = "<group>"; };
09DCCD202A18EF43003DCF8A /* HomeSevice.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeSevice.swift; sourceTree = "<group>"; };
09DCCD222A18EFB0003DCF8A /* HomeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeAPI.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -455,6 +459,7 @@
isa = PBXGroup;
children = (
3B027A9D299C34DA00BEB65C /* HomeViewController.swift */,
09CF56032B09F23800526C8C /* HomeDataSource.swift */,
092C09B42A484DD900E9B06B /* HomeDeleteViewController.swift */,
0930DE6129B80550007958DE /* MissionDetailViewController.swift */,
09582B4E29BEBAFA00EF3207 /* DetailCalendarViewController.swift */,
Expand All @@ -469,7 +474,7 @@
097C003529AB8270008CAEF3 /* MissionListCollectionViewCell.swift */,
092E04B029BD9C86008A5892 /* MissionDetailCollectionViewCell.swift */,
09582B4A29BDE37C00EF3207 /* DetailFooterReusableView.swift */,
09582B4C29BE277800EF3207 /* DetailHeaderReusableView.swift */,
09582B4C29BE277800EF3207 /* DetailHeaderView.swift */,
);
path = Cells;
sourceTree = "<group>";
Expand Down Expand Up @@ -1061,6 +1066,7 @@
isa = PBXGroup;
children = (
6CF4705A29A68EA9008D145C /* URLConstant.swift */,
0964BA492B0F6BFB00A8984B /* AuthInterceptor.swift */,
6CF4705C29A68F5C008D145C /* NetworkLoggerPlugin.swift */,
6CF4705E29A69025008D145C /* GeneralResponse.swift */,
6CF4706029A69096008D145C /* NetworkConstant.swift */,
Expand Down Expand Up @@ -1299,6 +1305,7 @@
09022D4629C44BC300DE6E49 /* MissionCalendarCell.swift in Sources */,
6CA2083A2A195906001C4247 /* AuthResponseDTO.swift in Sources */,
09582B4B29BDE37C00EF3207 /* DetailFooterReusableView.swift in Sources */,
09CF56042B09F23800526C8C /* HomeDataSource.swift in Sources */,
093DB03F2A15FCC100ECA5F6 /* MissionDetailResponseDTO.swift in Sources */,
6CF4705B29A68EA9008D145C /* URLConstant.swift in Sources */,
3BD3B5C829B8F82C00D3575B /* AddMissionTextFieldView.swift in Sources */,
Expand Down Expand Up @@ -1331,6 +1338,7 @@
09582B4829BDA7F600EF3207 /* DetailStackView.swift in Sources */,
09F6718429CADB1100708725 /* OnboardingModel.swift in Sources */,
3B027A7A299C31B500BEB65C /* SceneDelegate.swift in Sources */,
0964BA4A2B0F6BFB00A8984B /* AuthInterceptor.swift in Sources */,
09582B5129C0BC3600EF3207 /* DetailAchievementViewController.swift in Sources */,
0982DE5829AE40FB00D933D2 /* UITabBar+.swift in Sources */,
3BC1A27929C9BE6C0088376B /* AddMissionFooterCollectionReusableView.swift in Sources */,
Expand All @@ -1351,7 +1359,7 @@
3BBB6C8F2A1E7BEA00B8745A /* CollectionViewLeftAlignLayout.swift in Sources */,
09A1465F2A192C4900DDC308 /* WeekMissionResponseDTO.swift in Sources */,
0930D37329B4FCAE0000C4AE /* StatisticsView.swift in Sources */,
09582B4D29BE277800EF3207 /* DetailHeaderReusableView.swift in Sources */,
09582B4D29BE277800EF3207 /* DetailHeaderView.swift in Sources */,
6CF4706A29A71D71008D145C /* Strings.swift in Sources */,
6CF4705F29A69025008D145C /* GeneralResponse.swift in Sources */,
097C003629AB8270008CAEF3 /* MissionListCollectionViewCell.swift in Sources */,
Expand Down
27 changes: 20 additions & 7 deletions iOS-NOTTODO/iOS-NOTTODO/Application/SceneDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@ import UIKit
import KakaoSDKAuth

class SceneDelegate: UIResponder, UIWindowSceneDelegate {

var window: UIWindow?
static var shared: SceneDelegate? { UIApplication.shared.connectedScenes.first?.delegate as? SceneDelegate }

func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
if let windowScene = scene as? UIWindowScene {
let window = UIWindow(windowScene: windowScene)
window.overrideUserInterfaceStyle = UIUserInterfaceStyle.light

let rootViewController = ValueOnboardingViewController()
let navigationController = UINavigationController(rootViewController: rootViewController)
navigationController.isNavigationBarHidden = true
Expand All @@ -33,19 +34,31 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
}
}
}

func sceneDidDisconnect(_ scene: UIScene) {
}

func sceneDidBecomeActive(_ scene: UIScene) {
}

func sceneWillResignActive(_ scene: UIScene) {
}

func sceneWillEnterForeground(_ scene: UIScene) {
}

func sceneDidEnterBackground(_ scene: UIScene) {
}
}

extension SceneDelegate {

func changeRootViewControllerTo(_ viewController: UIViewController) {
guard let window = window else { return }

let rootViewController = viewController
let navigationController = UINavigationController(rootViewController: rootViewController)
navigationController.isNavigationBarHidden = true
window.rootViewController = navigationController
}
}
23 changes: 11 additions & 12 deletions iOS-NOTTODO/iOS-NOTTODO/Network/API/Achieve/AchieveAPI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ final class AchieveAPI {

static let shared: AchieveAPI = AchieveAPI()

private let achieveProvider = MoyaProvider<AchieveService>(plugins: [MoyaLoggingPlugin()])
private let achieveProvider = MoyaProvider<AchieveService>(session: Session(interceptor: AuthInterceptor.shared), plugins: [MoyaLoggingPlugin()])

private init() { }

Expand All @@ -40,17 +40,16 @@ final class AchieveAPI {
// MARK: - GET

func getAchieveCalendar(month: String, completion: @escaping (GeneralArrayResponse<AchieveCalendarResponseDTO>?) -> Void) {
achieveProvider.request(.achieveCalendar(month: month)) { response in
switch response {
case .success(let result):
do {
let responseData = try result.map(GeneralArrayResponse<AchieveCalendarResponseDTO>.self)
self.achieveCalendarData = responseData
completion(self.achieveCalendarData)
} catch let error {
print(error.localizedDescription)
completion(nil)
}
achieveProvider.request(.achieveCalendar(month: month)) { result in
switch result {
case .success(let response):
do {
self.achieveCalendarData = try response.map(GeneralArrayResponse<AchieveCalendarResponseDTO>?.self)
guard let achieveCalendarData = self.achieveCalendarData else { return completion(nil) }
completion(achieveCalendarData)
} catch let err {
print(err.localizedDescription, 500)
}
case .failure(let err):
print(err.localizedDescription)
completion(nil)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ final class AddMissionAPI {

static let shared: AddMissionAPI = AddMissionAPI()

private let addMissionProvider = MoyaProvider<AddMissionService>(plugins: [MoyaLoggingPlugin()])
private let addMissionProvider = MoyaProvider<AddMissionService>(session: Session(interceptor: AuthInterceptor.shared), plugins: [MoyaLoggingPlugin()])

private init() { }

Expand Down
2 changes: 1 addition & 1 deletion iOS-NOTTODO/iOS-NOTTODO/Network/API/Auth/AuthAPI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ final class AuthAPI {

static let shared: AuthAPI = AuthAPI()

private let authProvider = MoyaProvider<AuthService>(plugins: [MoyaLoggingPlugin()])
private let authProvider = MoyaProvider<AuthService>(session: Session(interceptor: AuthInterceptor.shared), plugins: [MoyaLoggingPlugin()])

private init() { }

Expand Down
Loading

0 comments on commit b46df06

Please sign in to comment.