Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
7ee6992
[추가]스플래쉬 이미지 스토리보드에도 추가
hyeonsik971029 Sep 22, 2025
51046f5
[추가] Intro MARK 주석 추가
hyeonsik971029 Sep 22, 2025
83078f4
[추가] 홈 및 알림 화면에 사용될 이미지 추가
hyeonsik971029 Oct 5, 2025
a9e205b
[변경] 불필요한 request 모델 정리
hyeonsik971029 Oct 5, 2025
cca11ca
[추가] 홈 및 알림 화면에 필요한 모델 추가
hyeonsik971029 Oct 5, 2025
4d9d2d4
[추가] 홈 및 알림 화면에 필요한 클린아키텍처 관련 파일 추가
hyeonsik971029 Oct 5, 2025
c67a7b0
[변경] 홈 및 알림 화면에 사용될 컴포넌트 정리
hyeonsik971029 Oct 5, 2025
cee33d7
[변경] 홈 및 알림 화면에 필요한 파운데이션 정리
hyeonsik971029 Oct 5, 2025
8ed161e
[변경] 불필요한 이전 작업 결과물 정리
hyeonsik971029 Oct 5, 2025
bbc3bd2
[변경] 홈 및 알림 화면 관련 파일 정리
hyeonsik971029 Oct 5, 2025
1a5346e
[변경] 개선 작업 중 호환되지 않는 부분 주석 처리
hyeonsik971029 Oct 5, 2025
bec55c8
[버전] Develop 1.14.0(1014000) 버전 업데이트
hyeonsik971029 Oct 5, 2025
54d1707
[변경] 탭바 표시 시점 변경
hyeonsik971029 Oct 5, 2025
5776b5e
[버전] Develop 1.14.1(1014010) 버전 업데이트
hyeonsik971029 Oct 5, 2025
a507e80
[수정] 피드 카드 높이 수정
hyeonsik971029 Oct 5, 2025
607eb88
[수정] 상단 탭바 인디케이터 우선순위 수정
hyeonsik971029 Oct 5, 2025
30deca7
[버전] Develop 1.14.2(101420) 버전 업데이트
hyeonsik971029 Oct 5, 2025
d6c6ae2
[수정] 피드 카드 시간 표기법 수접
hyeonsik971029 Oct 5, 2025
57bc769
[버전] Develop 1.14.3(1014030) 버전 업데이트
hyeonsik971029 Oct 5, 2025
e03c444
[수정] 피드 카드 본문 백그라운드 뷰 코너 수정
hyeonsik971029 Oct 5, 2025
8d49045
[수정] 피드 카드 border 수정
hyeonsik971029 Oct 5, 2025
62f82b8
[수정] 홈 화면 알림 유무 닷 뷰 수정
hyeonsik971029 Oct 5, 2025
fa93a0f
[버전] Develop 1.14.3(1014030) 버전 업데이트
hyeonsik971029 Oct 5, 2025
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
420 changes: 215 additions & 205 deletions SOOUM/SOOUM.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions SOOUM/SOOUM/App/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import FirebaseMessaging
import RxSwift

import CocoaLumberjack
import Kingfisher


@main
Expand Down Expand Up @@ -45,6 +46,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
// Initalize token
self.initializeTokenWhenFirstLaunch()

// Set Kinfisher caching limit
self.setupKingfisherCacheLimit()

FirebaseApp.configure()
// 파이어베이스 Meesaging 설정
Messaging.messaging().delegate = self
Expand Down Expand Up @@ -188,6 +192,19 @@ extension AppDelegate {
AuthKeyChain.shared.delete(.refreshToken)
}

private func setupKingfisherCacheLimit() {
let cache = ImageCache.default

/// 500MB
let diskLimit: UInt = 500 * 1024 * 1024
cache.diskStorage.config.sizeLimit = diskLimit
/// 디스크 캐시는 일주일 제한
cache.diskStorage.config.expiration = .days(7)
/// 100MB
let memoryLimit: Int = 100 * 1024 * 1024
cache.memoryStorage.config.totalCostLimit = memoryLimit
}

private func setupOnboardingWhenTransferSuccessed(_ userInfo: [AnyHashable: Any]?) {
// guard let infoDic = userInfo as? [String: Any] else { return }

Expand Down
6 changes: 6 additions & 0 deletions SOOUM/SOOUM/Data/Managers/NetworkManager/DefinedError.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ enum DefinedError: Error, LocalizedError {
case forbidden
case notFound
case teapot
case invlid
case locked
case invalidMethod(HTTPMethod)
case unknown(Int)
Expand All @@ -35,6 +36,8 @@ enum DefinedError: Error, LocalizedError {
return .notFound
case 418:
return .teapot
case 422:
return .invlid
case 423:
return .locked
default:
Expand All @@ -56,6 +59,8 @@ enum DefinedError: Error, LocalizedError {
return "Not Found: HTTP 404 received"
case .teapot:
return "Stop using RefreshToken: HTTP 418 received."
case .invlid:
return "Invlid Image: HTTP 422 received."
case .locked:
return "LOCKED: HTTP 423 received."
case let .invalidMethod(httpMethod):
Expand All @@ -73,6 +78,7 @@ enum DefinedError: Error, LocalizedError {
case .forbidden: 403
case .notFound: 404
case .teapot: 418
case .invlid: 422
case .locked: 423
case .invalidMethod: -99
case let .unknown(statusCode): statusCode
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,15 @@ struct NetworkManagerConfiguration: ManagerConfiguration {
self.sessionDelegate = sessionDelegate
self.sessionDelegateQueue = sessionDelegateQueue

let formatter = DateFormatter()
formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSSSS"
formatter.locale = .Korea
formatter.timeZone = .Korea

self.decoder = JSONDecoder()
self.decoder.dateDecodingStrategy = .iso8601
self.decoder.dateDecodingStrategy = .formatted(formatter)
self.encoder = JSONEncoder()
self.encoder.dateEncodingStrategy = .iso8601
self.encoder.dateEncodingStrategy = .formatted(formatter)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import Alamofire

struct BlockedNotificationInfoResponse {
struct BlockedNotificationInfoResponse: Hashable, Equatable {

let notificationInfo: CommonNotificationInfo
let blockExpirationDateTime: Date
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//
// CompositeNotificationInfoResponse.swift
// SOOUM
//
// Created by 오현식 on 9/26/25.
//

import Alamofire

struct CompositeNotificationInfoResponse: Decodable {

let notificationInfo: [CompositeNotificationInfo]
}

extension CompositeNotificationInfoResponse: EmptyResponse {

static func emptyValue() -> CompositeNotificationInfoResponse {
CompositeNotificationInfoResponse(notificationInfo: [])
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@

import Alamofire

struct DeleteNotificationInfoResponse {
struct DeletedNotificationInfoResponse: Hashable, Equatable {

let notificationInfo: CommonNotificationInfo
}

extension DeleteNotificationInfoResponse: EmptyResponse {
extension DeletedNotificationInfoResponse: EmptyResponse {

static func emptyValue() -> DeleteNotificationInfoResponse {
DeleteNotificationInfoResponse(notificationInfo: CommonNotificationInfo.defaultValue)
static func emptyValue() -> DeletedNotificationInfoResponse {
DeletedNotificationInfoResponse(notificationInfo: CommonNotificationInfo.defaultValue)
}
}

extension DeleteNotificationInfoResponse: Decodable {
extension DeletedNotificationInfoResponse: Decodable {

init(from decoder: any Decoder) throws {
let singleContainer = try decoder.singleValueContainer()
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
//
// FollowNotificationInfoResponse.swift
// SOOUM
//
// Created by 오현식 on 9/26/25.
//

import Alamofire

struct FollowNotificationInfoResponse: Hashable, Equatable {

let notificationInfo: CommonNotificationInfo
let nickname: String
let userId: String
}

extension FollowNotificationInfoResponse: EmptyResponse {

static func emptyValue() -> FollowNotificationInfoResponse {
FollowNotificationInfoResponse(
notificationInfo: CommonNotificationInfo.defaultValue,
nickname: "",
userId: ""
)
}
}

extension FollowNotificationInfoResponse: Decodable {

enum CodingKeys: CodingKey {
case notificationInfo
case nickname
case userId
}

init(from decoder: any Decoder) throws {
let singleContainer = try decoder.singleValueContainer()
self.notificationInfo = try singleContainer.decode(CommonNotificationInfo.self)

let container = try decoder.container(keyedBy: CodingKeys.self)
self.nickname = try container.decode(String.self, forKey: .nickname)
self.userId = String(try container.decode(Int64.self, forKey: .userId))
}
}
32 changes: 32 additions & 0 deletions SOOUM/SOOUM/Data/Models/Responses/HomeCardInfoResponse.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
//
// HomeCardInfoResponse.swift
// SOOUM
//
// Created by 오현식 on 9/28/25.
//

import Alamofire

struct HomeCardInfoResponse {

let cardInfos: [BaseCardInfo]
}

extension HomeCardInfoResponse: EmptyResponse {

static func emptyValue() -> HomeCardInfoResponse {
HomeCardInfoResponse(cardInfos: [])
}
}

extension HomeCardInfoResponse: Decodable {

enum CodingKeys: String, CodingKey {
case cardInfos
}

init(from decoder: any Decoder) throws {
let singleContainer = try decoder.singleValueContainer()
self.cardInfos = try singleContainer.decode([BaseCardInfo].self)
}
}
32 changes: 32 additions & 0 deletions SOOUM/SOOUM/Data/Models/Responses/NoticeInfoResponse.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
//
// NoticeInfoResponse.swift
// SOOUM
//
// Created by 오현식 on 9/26/25.
//

import Alamofire

struct NoticeInfoResponse {

let noticeInfos: [NoticeInfo]
}

extension NoticeInfoResponse: EmptyResponse {

static func emptyValue() -> NoticeInfoResponse {
NoticeInfoResponse(noticeInfos: [])
}
}

extension NoticeInfoResponse: Decodable {

enum CodingKeys: String, CodingKey {
case noticeInfos
}

init(from decoder: any Decoder) throws {
let container = try decoder.container(keyedBy: CodingKeys.self)
self.noticeInfos = try container.decode([NoticeInfo].self, forKey: .noticeInfos)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import Alamofire

struct NotificationInfoResponse {
struct NotificationInfoResponse: Hashable, Equatable {

let notificationInfo: CommonNotificationInfo
let targetCardId: String
Expand Down Expand Up @@ -38,7 +38,7 @@ extension NotificationInfoResponse: Decodable {
self.notificationInfo = try singleContainer.decode(CommonNotificationInfo.self)

let container = try decoder.container(keyedBy: CodingKeys.self)
self.targetCardId = String(try container.decode(Int.self, forKey: .targetCardId))
self.targetCardId = String(try container.decode(Int64.self, forKey: .targetCardId))
self.nickName = try container.decode(String.self, forKey: .nickName)
}
}
34 changes: 34 additions & 0 deletions SOOUM/SOOUM/Data/Repositories/CardRepositoryImpl.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
//
// CardRepositoryImpl.swift
// SOOUM
//
// Created by 오현식 on 9/28/25.
//

import Foundation

import RxSwift

class CardRepositoryImpl: CardRepository {

private let remoteDataSource: CardRemoteDataSource

init(remoteDataSource: CardRemoteDataSource) {
self.remoteDataSource = remoteDataSource
}

func latestCard(lastId: String?, latitude: String?, longitude: String?) -> Observable<HomeCardInfoResponse> {

return self.remoteDataSource.latestCard(lastId: lastId, latitude: latitude, longitude: longitude)
}

func popularCard(latitude: String?, longitude: String?) -> Observable<HomeCardInfoResponse> {

return self.remoteDataSource.popularCard(latitude: latitude, longitude: longitude)
}

func distanceCard(lastId: String?, latitude: String, longitude: String, distanceFilter: String) -> Observable<HomeCardInfoResponse> {

return self.remoteDataSource.distanceCard(lastId: lastId, latitude: latitude, longitude: longitude, distanceFilter: distanceFilter)
}
}
37 changes: 6 additions & 31 deletions SOOUM/SOOUM/Data/Repositories/NotificationRepositoryImpl.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,48 +17,23 @@ class NotificationRepositoryImpl: NotificationRepository {
self.remoteDataSource = remoteDataSource
}

func unreadNotifications(lastId: String?) -> Observable<[NotificationInfoResponse]> {
func unreadNotifications(lastId: String?) -> Observable<CompositeNotificationInfoResponse> {

return self.remoteDataSource.unreadNotifications(lastId: lastId)
}

func unreadCardNotifications(lastId: String?) -> Observable<[NotificationInfoResponse]> {

return self.remoteDataSource.unreadCardNotifications(lastId: lastId)
}

func unreadFollowNotifications(lastId: String?) -> Observable<[NotificationInfoResponse]> {

return self.remoteDataSource.unreadFollowNotifications(lastId: lastId)
}

func unreadNoticeNoticeNotifications(lastId: String?) -> Observable<[NotificationInfoResponse]> {

return self.remoteDataSource.unreadNoticeNoticeNotifications(lastId: lastId)
}

func readNotifications(lastId: String?) -> Observable<[NotificationInfoResponse]> {
func readNotifications(lastId: String?) -> Observable<CompositeNotificationInfoResponse> {

return self.remoteDataSource.readNotifications(lastId: lastId)
}

func readCardNotifications(lastId: String?) -> Observable<[NotificationInfoResponse]> {

return self.remoteDataSource.readCardNotifications(lastId: lastId)
}

func readFollowNotifications(lastId: String?) -> Observable<[NotificationInfoResponse]> {

return self.remoteDataSource.readFollowNotifications(lastId: lastId)
}

func readNoticeNoticeNotifications(lastId: String?) -> Observable<[NotificationInfoResponse]> {
func requestRead(notificationId: String) -> Observable<Int> {

return self.remoteDataSource.readNoticeNoticeNotifications(lastId: lastId)
return self.remoteDataSource.requestRead(notificationId: notificationId)
}

func requestRead(notificationId: String) -> Observable<Int> {
func notices(lastId: String?) -> Observable<NoticeInfoResponse> {

return self.remoteDataSource.requestRead(notificationId: notificationId)
return self.remoteDataSource.notices(lastId: lastId)
}
}
Loading
Loading