Skip to content

Commit 55d0929

Browse files
committed
Merge branch 'release/1.0.1'
2 parents fdb167c + 5fd2e82 commit 55d0929

File tree

230 files changed

+3232
-446
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

230 files changed

+3232
-446
lines changed

.mise.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
[tools]
2-
tuist = "4.21.1"
2+
tuist = "4.43.2"

Package.resolved

Lines changed: 27 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version: 5.9
1+
// swift-tools-version: 6.0
22
import PackageDescription
33

44
#if TUIST
@@ -15,8 +15,8 @@ let package: Package = .init(
1515
name: "Mohanyang",
1616
platforms: [.iOS(.v17)],
1717
dependencies: [
18-
.package(url: "https://github.com/pointfreeco/swift-composable-architecture.git", exact: "1.11.2"),
19-
.package(url: "https://github.com/pointfreeco/swift-dependencies.git", exact: "1.3.3"),
18+
.package(url: "https://github.com/pointfreeco/swift-composable-architecture.git", exact: "1.16.1"),
19+
.package(url: "https://github.com/pointfreeco/swift-dependencies.git", from: "1.4.0"),
2020
.package(url: "https://github.com/rive-app/rive-ios.git", exact: "5.15.1"),
2121
.package(url: "https://github.com/airbnb/lottie-spm.git", exact: "4.5.0"),
2222
.package(url: "https://github.com/Datadog/dd-sdk-ios.git", exact: "2.16.0")

Plugins/DependencyPlugin/Plugin.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
// Created by MinseokKang on 2024/07/15.
66
//
77

8-
import ProjectDescription
8+
@preconcurrency import ProjectDescription
99

1010
let dependencyPlugin = Plugin(name: "DependencyPlugin")

Plugins/DependencyPlugin/ProjectDescriptionHelpers/Module/Core.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,5 @@ public enum Core: String, Modulable {
2020
case LiveActivityClient
2121
case AudioClient
2222
case BackgroundTaskClient
23+
case AnalyticsClient
2324
}

Plugins/UtilityPlugin/Plugin.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
// Created by MinseokKang on 2024/07/15.
66
//
77

8-
import ProjectDescription
8+
@preconcurrency import ProjectDescription
99

1010
let utilityPlugin = Plugin(name: "UtilityPlugin")

Plugins/UtilityPlugin/ProjectDescriptionHelpers/BuildConfiguration.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import ProjectDescription
99

10-
public enum BuildConfiguration: String, CaseIterable {
10+
public enum BuildConfiguration: String, CaseIterable, Sendable {
1111
case dev
1212
case prod
1313
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
//
2+
// APIErrorResponse.swift
3+
// APIClientInterface
4+
//
5+
// Created by 김지현 on 4/10/25.
6+
// Copyright © 2025 PomoNyang. All rights reserved.
7+
//
8+
9+
import Foundation
10+
11+
public struct APIErrorResponse: Decodable, Error {
12+
public let type: String
13+
public let message: String
14+
public let errorTraceId: String
15+
}

Projects/Core/APIClient/Sources/APIClient.swift

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,10 @@ import APIClientInterface
1313

1414
import Dependencies
1515

16-
extension APIClient: DependencyKey {
16+
extension APIClient: @retroactive DependencyKey {
1717
public static let liveValue: APIClient = .live()
1818

1919
public static func live() -> Self {
20-
2120
actor Session {
2221
nonisolated let tokenInterceptor: TokenInterceptor
2322

@@ -67,7 +66,11 @@ extension APIClient: DependencyKey {
6766
try await tokenInterceptor.retry(for: self.session)
6867
return try await sendRequest(request, isWithInterceptor: isWithInterceptor, retryCnt: retryCnt + 1)
6968
case 400..<500:
70-
throw throwNetworkErr(.requestError("bad request"), statusCode: httpResponse.statusCode)
69+
if let apiError = try? decoder.decode(APIErrorResponse.self, from: data) {
70+
throw throwNetworkErr(.apiError(apiError.message), statusCode: httpResponse.statusCode)
71+
} else {
72+
throw throwNetworkErr(.requestError("bad request"), statusCode: httpResponse.statusCode)
73+
}
7174
case 500..<600:
7275
throw throwNetworkErr(.serverError, statusCode: httpResponse.statusCode)
7376
default:
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
//
2+
// AnalyticsClientInterface.swift
3+
// AnalyticsClient
4+
//
5+
// Created by devMinseok on 4/22/25.
6+
//
7+
8+
import Dependencies
9+
import DependenciesMacros
10+
11+
@DependencyClient
12+
public struct AnalyticsClient {
13+
public var sendEvent: @Sendable (_ data: EventData) -> Void
14+
public var initialize: @Sendable (_ userId: String) -> Void
15+
}

0 commit comments

Comments
 (0)