Skip to content
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,6 @@ fastlane/test_output

# Compiled binaries
tuisttool

# Claude Code
CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public struct ProjectConfig {

// MARK: - 🔧 기타 설정
public static let bundleIdPrefix = "com.ddd-ios2.Bangawo"
public static let teamId = "DH9CS7PA5D"
public static let teamId = "8NJPCU8Y7S"
public static let deploymentTarget: ProjectDescription.DeploymentTargets = .iOS("17.0")
public static let deploymentDestination: ProjectDescription.Destinations = [.iPhone]
public static let appVersion = "1.0.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ extension Settings {
.setSkipInstall(setSkipInstall)
.setCFBundleDevelopmentRegion("ko")
}

private static func commonBaseSettings(
appName: String
) -> SettingsDictionary {
Expand All @@ -33,7 +33,7 @@ extension Settings {
.setOtherLdFlags("-ObjC -all_load")
.setStripStyle()
}

public static let appMainSetting: Settings = .settings(
base: SettingsDictionary()
.setProductName(Project.Environment.appName)
Expand Down Expand Up @@ -99,7 +99,7 @@ extension Settings {

], defaultSettings: .recommended
)

public static func appBaseSetting(appName: String) -> Settings {
let appBaseSetting: Settings = .settings(
base: SettingsDictionary()
Expand Down Expand Up @@ -129,8 +129,8 @@ extension Settings {
xcconfig: .relativeToRoot("./Config/Release.xcconfig")
)
], defaultSettings: .recommended)

return appBaseSetting

}
}
104 changes: 100 additions & 4 deletions Projects/App/Bangawo.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions Projects/Data/Model/Model.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

/* Begin PBXBuildFile section */
78911C6E462B87C91C44BD2F /* Base.swift in Sources */ = {isa = PBXBuildFile; fileRef = 94DF26FC571CCDF104E7773B /* Base.swift */; };
8F04EA52160AB1213C334036 /* BaseResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = 503F55E623271CCA17915AAD /* BaseResponse.swift */; };
DEFBC66085F867D23E0345CB /* Entity.framework in Dependencies */ = {isa = PBXBuildFile; fileRef = D22072369C7A243701AC331A /* Entity.framework */; };
/* End PBXBuildFile section */

Expand Down Expand Up @@ -35,6 +36,7 @@
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
503F55E623271CCA17915AAD /* BaseResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseResponse.swift; sourceTree = "<group>"; };
94DF26FC571CCDF104E7773B /* Base.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Base.swift; sourceTree = "<group>"; };
9861501D039B06394C2A7E64 /* Model-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = "Model-Info.plist"; sourceTree = "<group>"; };
BD19E51E52BA74F9617F5F81 /* Model.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Model.framework; sourceTree = BUILT_PRODUCTS_DIR; };
Expand Down Expand Up @@ -90,6 +92,7 @@
isa = PBXGroup;
children = (
94DF26FC571CCDF104E7773B /* Base.swift */,
503F55E623271CCA17915AAD /* BaseResponse.swift */,
);
path = Sources;
sourceTree = "<group>";
Expand Down Expand Up @@ -170,6 +173,7 @@
buildActionMask = 2147483647;
files = (
78911C6E462B87C91C44BD2F /* Base.swift in Sources */,
8F04EA52160AB1213C334036 /* BaseResponse.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
50 changes: 50 additions & 0 deletions Projects/Data/Model/Sources/BaseResponse.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
//
// BaseResponse.swift
// Model
//
// Created by DDD-iOS2 on 4/13/26.
// Copyright © 2025 DDD, Ltd., All rights reserved.
//

import Foundation

/// 서버 응답에 data가 없는 경우 사용하는 빈 응답 모델
/// 예: BaseResponse<EmptyResponseModel> 형태로 활용
public struct EmptyResponseModel: Codable {
public init() {}
}

/// 서버 API의 공통 응답 래퍼 모델
/// 모든 API 응답은 status, message, data 구조를 따름
/// - Parameter T: 실제 응답 데이터의 타입 (Codable 준수 필요)
///
/// 사용 예시:
/// ```swift
/// // data가 있는 경우
/// let response: BaseResponse<UserModel> = try decode(data)
///
/// // data가 없는 경우
/// let response: BaseResponse<EmptyResponseModel> = try decode(data)
/// ```
public struct BaseResponse<T: Codable>: Codable {
/// HTTP 상태 코드 (e.g., 200, 400, 500)
public let status: Int
/// 서버에서 전달하는 응답 메시지
public let message: String
/// 실제 응답 데이터 (없을 수 있으므로 Optional)
public let data: T?

enum CodingKeys: String, CodingKey {
case status
case message
case data
}

/// JSON 디코딩 시 data 필드가 없어도 에러 없이 nil로 처리
public init(from decoder: Decoder) throws {
let container = try decoder.container(keyedBy: CodingKeys.self)
status = try container.decode(Int.self, forKey: .status)
message = try container.decode(String.self, forKey: .message)
data = try container.decodeIfPresent(T.self, forKey: .data)
}
}
Loading