Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Refactor] Network 및 Constants, Utils 리펙토링 #9

Merged
merged 1 commit into from
Jan 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
367 changes: 264 additions & 103 deletions idorm.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions idorm.xcworkspace/xcshareddata/swiftpm/Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@
"version" : "5.0.0"
}
},
{
"identity" : "growingtextview",
"kind" : "remoteSourceControl",
"location" : "https://github.com/KennethTsang/GrowingTextView.git",
"state" : {
"revision" : "0cda2caf03bf6cb2ec6dc006873c3c865933be09",
"version" : "0.7.2"
}
},
{
"identity" : "moya",
"kind" : "remoteSourceControl",
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,21 @@
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "61123AAD-C781-410D-B922-C760B87AF744"
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "idorm/Source/Presentation/Community/ViewControllers/PostDetailVC.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "19"
endingLineNumber = "19"
landmarkName = "PostDetailViewController"
landmarkType = "3">
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
</Bucket>
2 changes: 1 addition & 1 deletion idorm/Configuration/Base/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {

extension AppDelegate {
private func setupNavigationBarAppearance() {
let appearance = AppearanceManager.navigationAppearance(from: .white, shadow: false)
let appearance = NavigationAppearanceUtils.navigationAppearance(from: .white, shadow: false)
UINavigationBar.appearance().compactAppearance = appearance
UINavigationBar.appearance().standardAppearance = appearance
UINavigationBar.appearance().scrollEdgeAppearance = appearance
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "corner-down-right.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"images" : [
{
"filename" : "1.png",
"filename" : "Frame 36830.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "2.png",
"filename" : "Frame 36830@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "3.png",
"filename" : "Frame 36830@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "Frame 10961.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Frame [email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Frame [email protected]",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "Frame 10961.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Frame [email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Frame [email protected]",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "Frame 36843.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Frame [email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Frame [email protected]",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
10 changes: 8 additions & 2 deletions idorm/Configuration/Base/SceneDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,19 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {

if TokenStorage.hasToken() {
// 토큰 Refresh
_ = APIService.memberProvider.rx.request(.login(id: email, pw: password))
_ = MemberAPI.provider.rx.request(
.login(id: email, pw: password)
)
.asObservable()
.retry()
.bind { response in
switch response.statusCode {
case 200..<300:
let responseModel = APIService.decode(ResponseModel<MemberDTO.Retrieve>.self, data: response.data).data
let responseModel = MemberAPI.decode(
ResponseModel<MemberResponseModel.Member>.self,
data: response.data
).data

TokenStorage.saveToken(token: responseModel.loginToken!)
default:
break
Expand Down
35 changes: 0 additions & 35 deletions idorm/Configuration/Constants/MatchingEnumerations.swift

This file was deleted.

40 changes: 0 additions & 40 deletions idorm/Configuration/Constants/MyPageEnumerations.swift

This file was deleted.

14 changes: 14 additions & 0 deletions idorm/Configuration/Constants/Onboarding.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//
// Onboarding.swift
// idorm
//
// Created by 김응철 on 2023/01/31.
//

import Foundation

enum Onboarding {
case initial
case main
case modify
}
5 changes: 0 additions & 5 deletions idorm/Configuration/Constants/OnboardingEnumerations.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,3 @@

import Foundation

enum OnboardingEnumerations {
case initial
case main
case modify
}
14 changes: 14 additions & 0 deletions idorm/Configuration/Constants/Register.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//
// Register.swift
// idorm
//
// Created by 김응철 on 2023/01/31.
//

import Foundation

enum Register {
case signUp
case findPw
case modifyPw
}
19 changes: 0 additions & 19 deletions idorm/Configuration/Constants/RegisterEnumerations.swift

This file was deleted.

13 changes: 13 additions & 0 deletions idorm/Configuration/Constants/Roommate.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//
// Roommate.swift
// idorm
//
// Created by 김응철 on 2023/01/31.
//

import Foundation

enum Roommate {
case like
case dislike
}
15 changes: 15 additions & 0 deletions idorm/Configuration/Extensions/String+.swift
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,18 @@ extension String {
return []
}
}

// MARK: - CommunityDTO

extension String {
var isAnonymous: String {
switch self {
case "anonymous":
return "익명"
case nil:
return "탈퇴한 사용자"
default:
return self
}
}
}
4 changes: 4 additions & 0 deletions idorm/Configuration/Extensions/UIColor+.swift
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,8 @@ extension UIColor {
static var idorm_green: UIColor {
return UIColor.init(rgb: 0x60D989)
}

static var idorm_matchingScreen: UIColor {
return .init(rgb: 0xF8FDFF)
}
}
22 changes: 22 additions & 0 deletions idorm/Configuration/Extensions/UIFont+.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
//
// UIFont+.swift
// idorm
//
// Created by 김응철 on 2023/01/23.
//

import UIKit

extension UIFont {

enum IdormFont: String {
case bold = "NotoSansCJKkr-Bold"
case regular = "NotoSansCJKkr-Regular"
case medium = "NotoSansCJKkr-Medium"
}

static func idormFont(_ font: IdormFont, size: CGFloat) -> UIFont {
let idormFont = UIFont(name: font.rawValue, size: size)!
return idormFont
}
}
Loading