diff --git a/Terning-iOS/Terning-iOS.xcodeproj/project.pbxproj b/Terning-iOS/Terning-iOS.xcodeproj/project.pbxproj
index 10299230..0821e09f 100644
--- a/Terning-iOS/Terning-iOS.xcodeproj/project.pbxproj
+++ b/Terning-iOS/Terning-iOS.xcodeproj/project.pbxproj
@@ -1730,6 +1730,7 @@
};
71E3C3DE2C22BAF50026C4DD /* Debug */ = {
isa = XCBuildConfiguration;
+ baseConfigurationReference = B8F503372C749309000D2A22 /* Config.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
@@ -1746,6 +1747,7 @@
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
+ INFOPLIST_KEY_UIUserInterfaceStyle = Light;
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
@@ -1770,6 +1772,7 @@
};
71E3C3DF2C22BAF50026C4DD /* Release */ = {
isa = XCBuildConfiguration;
+ baseConfigurationReference = B8F503372C749309000D2A22 /* Config.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
@@ -1786,6 +1789,7 @@
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
+ INFOPLIST_KEY_UIUserInterfaceStyle = Light;
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
diff --git a/Terning-iOS/Terning-iOS/Info.plist b/Terning-iOS/Terning-iOS/Info.plist
index 8c776254..29de42e7 100644
--- a/Terning-iOS/Terning-iOS/Info.plist
+++ b/Terning-iOS/Terning-iOS/Info.plist
@@ -2,14 +2,16 @@
+ CFBundleIconName
+ AppIcon
CFBundleDisplayName
terning
CFBundleShortVersionString
1.0.4
CFBundleVersion
2024.1119.2145
- ITSAppUsesNonExemptEncryption
-
+ CFBundleName
+ $(PRODUCT_NAME)
CFBundleURLTypes
@@ -23,13 +25,19 @@
KAKAO_NATIVE_APP_KEY
$(KAKAO_NATIVE_APP_KEY)
+ LSApplicationQueriesSchemes
+
+ kakaokompassauth
+ kakaolink
+ kakaotalk
+
NSAppTransportSecurity
NSAllowsArbitraryLoads
- UIUserInterfaceStyle
- Light
+ ITSAppUsesNonExemptEncryption
+
UIAppFonts
Pretendard-Light.otf
@@ -54,5 +62,7 @@
+ UIUserInterfaceStyle
+ Light
diff --git a/Terning-iOS/Terning-iOS/Resource/Utils/setImage.swift b/Terning-iOS/Terning-iOS/Resource/Utils/setImage.swift
index 87f6c092..c8792af4 100644
--- a/Terning-iOS/Terning-iOS/Resource/Utils/setImage.swift
+++ b/Terning-iOS/Terning-iOS/Resource/Utils/setImage.swift
@@ -6,6 +6,7 @@
//
import UIKit
+import SwiftUI
import Kingfisher
public extension UIImageView {
@@ -52,3 +53,21 @@ public extension UIImageView {
)
}
}
+
+struct RemoteImageView: View {
+ let urlString: String
+
+ var body: some View {
+ KFImage(URL(string: urlString))
+ .placeholder {
+ Image("img_placeholder") // 로드 중에 표시할 placeholder
+ .resizable()
+ .scaledToFit()
+ }
+ .resizable()
+ .fade(duration: 0.5)
+ .loadDiskFileSynchronously()
+ .cacheMemoryOnly()
+ .scaledToFit()
+ }
+}
diff --git a/Terning-iOS/Terning-iOS/Source/Data/Network/Service/AuthInterceptor.swift b/Terning-iOS/Terning-iOS/Source/Data/Network/Service/AuthInterceptor.swift
index 1a4b3e79..d220b027 100644
--- a/Terning-iOS/Terning-iOS/Source/Data/Network/Service/AuthInterceptor.swift
+++ b/Terning-iOS/Terning-iOS/Source/Data/Network/Service/AuthInterceptor.swift
@@ -14,33 +14,26 @@ import Moya
final class AuthInterceptor: RequestInterceptor {
static let shared = AuthInterceptor()
-
- private var retryCount = 0
- private let maxRetryCount = 3
-
+
private init() {}
func adapt(_ urlRequest: URLRequest, for session: Session, completion: @escaping (Result) -> Void) {
- var urlRequest = urlRequest
-
guard urlRequest.url?.absoluteString.hasPrefix(Config.baseURL) == true,
- let accessToken = UserManager.shared.accessToken,
- let refreshToken = UserManager.shared.refreshToken
+ let accessToken = UserManager.shared.accessToken
else {
completion(.success(urlRequest))
return
}
- urlRequest.setValue(accessToken, forHTTPHeaderField: "accessToken")
- urlRequest.setValue(refreshToken, forHTTPHeaderField: "refreshToken")
+ var urlRequest = urlRequest
+ urlRequest.setValue("Bearer \(accessToken)", forHTTPHeaderField: "Authorization")
print("adator 적용 \(urlRequest.headers)")
completion(.success(urlRequest))
}
func retry(_ request: Request, for session: Session, dueTo error: Error, completion: @escaping (RetryResult) -> Void) {
print("retry 진입")
- guard retryCount < maxRetryCount,
- let response = request.task?.response as? HTTPURLResponse,
+ guard let response = request.task?.response as? HTTPURLResponse,
response.statusCode == 401,
let pathComponents = request.request?.url?.pathComponents,
!pathComponents.contains("getNewToken")
@@ -54,7 +47,6 @@ final class AuthInterceptor: RequestInterceptor {
switch result {
case .success:
print("Retry-토큰 재발급 성공")
- self.retryCount += 1
completion(.retry)
case .failure(let error):
// 세션 만료 -> 로그인 화면으로 전환
diff --git a/Terning-iOS/Terning-iOS/Source/Data/Network/Service/Providers.swift b/Terning-iOS/Terning-iOS/Source/Data/Network/Service/Providers.swift
index b7624068..0832ad82 100644
--- a/Terning-iOS/Terning-iOS/Source/Data/Network/Service/Providers.swift
+++ b/Terning-iOS/Terning-iOS/Source/Data/Network/Service/Providers.swift
@@ -11,7 +11,7 @@ import Moya
struct Providers {
static let calendarProvider = MoyaProvider(withAuth: true)
- static let authProvider = MoyaProvider(withAuth: true)
+ static let authProvider = MoyaProvider(withAuth: false)
static let homeProvider = MoyaProvider(withAuth: true)
static let myPageProvider = MoyaProvider(withAuth: true)
static let scrapsProvider = MoyaProvider(withAuth: true)
diff --git a/Terning-iOS/Terning-iOS/Source/Data/Network/TargetType/AnnouncementsTargetType.swift b/Terning-iOS/Terning-iOS/Source/Data/Network/TargetType/AnnouncementsTargetType.swift
index 7d95a9e8..dbbc50a9 100644
--- a/Terning-iOS/Terning-iOS/Source/Data/Network/TargetType/AnnouncementsTargetType.swift
+++ b/Terning-iOS/Terning-iOS/Source/Data/Network/TargetType/AnnouncementsTargetType.swift
@@ -43,7 +43,7 @@ extension AnnouncementsTargetType: TargetType {
}
var headers: [String: String]? {
- return Config.headerWithAccessToken
+ return Config.defaultHeader
}
var validationType: ValidationType {
diff --git a/Terning-iOS/Terning-iOS/Source/Data/Network/TargetType/CalendarTargetType.swift b/Terning-iOS/Terning-iOS/Source/Data/Network/TargetType/CalendarTargetType.swift
index 63600d28..21130b5e 100644
--- a/Terning-iOS/Terning-iOS/Source/Data/Network/TargetType/CalendarTargetType.swift
+++ b/Terning-iOS/Terning-iOS/Source/Data/Network/TargetType/CalendarTargetType.swift
@@ -50,7 +50,7 @@ extension CalendarTargetType: TargetType {
}
var headers: [String: String]? {
- return Config.headerWithAccessToken
+ return Config.defaultHeader
}
var validationType: ValidationType {
diff --git a/Terning-iOS/Terning-iOS/Source/Data/Network/TargetType/FiltersTargetType.swift b/Terning-iOS/Terning-iOS/Source/Data/Network/TargetType/FiltersTargetType.swift
index 3b4d8a3e..f17335f6 100644
--- a/Terning-iOS/Terning-iOS/Source/Data/Network/TargetType/FiltersTargetType.swift
+++ b/Terning-iOS/Terning-iOS/Source/Data/Network/TargetType/FiltersTargetType.swift
@@ -56,7 +56,7 @@ extension FiltersTargetType: TargetType {
}
var headers: [String: String]? {
- return Config.headerWithAccessToken
+ return Config.defaultHeader
}
var validationType: ValidationType {
diff --git a/Terning-iOS/Terning-iOS/Source/Data/Network/TargetType/HomeTargetType.swift b/Terning-iOS/Terning-iOS/Source/Data/Network/TargetType/HomeTargetType.swift
index a1cbd305..74c47fd9 100644
--- a/Terning-iOS/Terning-iOS/Source/Data/Network/TargetType/HomeTargetType.swift
+++ b/Terning-iOS/Terning-iOS/Source/Data/Network/TargetType/HomeTargetType.swift
@@ -54,7 +54,7 @@ extension HomeTargetType: TargetType {
}
var headers: [String: String]? {
- return ["Content-Type": "application/json", "Authorization": "Bearer \(Config.accessToken)"]
+ return Config.defaultHeader
}
var validationType: ValidationType {
diff --git a/Terning-iOS/Terning-iOS/Source/Data/Network/TargetType/MyPageTargetType.swift b/Terning-iOS/Terning-iOS/Source/Data/Network/TargetType/MyPageTargetType.swift
index fd2aa826..3e83a379 100644
--- a/Terning-iOS/Terning-iOS/Source/Data/Network/TargetType/MyPageTargetType.swift
+++ b/Terning-iOS/Terning-iOS/Source/Data/Network/TargetType/MyPageTargetType.swift
@@ -66,7 +66,7 @@ extension MyPageTargetType: TargetType {
}
var headers: [String: String]? {
- return Config.headerWithAccessToken
+ return Config.defaultHeader
}
var validationType: ValidationType {
diff --git a/Terning-iOS/Terning-iOS/Source/Data/Network/TargetType/ScrapsTargetType.swift b/Terning-iOS/Terning-iOS/Source/Data/Network/TargetType/ScrapsTargetType.swift
index 691c2dc9..4f6da29e 100644
--- a/Terning-iOS/Terning-iOS/Source/Data/Network/TargetType/ScrapsTargetType.swift
+++ b/Terning-iOS/Terning-iOS/Source/Data/Network/TargetType/ScrapsTargetType.swift
@@ -53,7 +53,7 @@ extension ScrapsTargetType: TargetType {
}
var headers: [String: String]? {
- return Config.headerWithAccessToken
+ return Config.defaultHeader
}
var validationType: ValidationType {
diff --git a/Terning-iOS/Terning-iOS/Source/Data/Network/TargetType/SearchTargetType.swift b/Terning-iOS/Terning-iOS/Source/Data/Network/TargetType/SearchTargetType.swift
index 7b3aaa1f..2a3eef86 100644
--- a/Terning-iOS/Terning-iOS/Source/Data/Network/TargetType/SearchTargetType.swift
+++ b/Terning-iOS/Terning-iOS/Source/Data/Network/TargetType/SearchTargetType.swift
@@ -54,7 +54,7 @@ extension SearchTargetType: TargetType {
}
var headers: [String: String]? {
- return Config.headerWithAccessToken
+ return Config.defaultHeader
}
var validationType: ValidationType {