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
1 change: 1 addition & 0 deletions App/Project.swift
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ private let appTarget = Target.target(
.project(target: "Data", path: "../Data")
],
settings: .settings(
base: ["ASSETCATALOG_COMPILER_APPICON_NAME": "ChaGok"],
configurations: [
.debug(name: "Debug", settings: [
"CODE_SIGN_IDENTITY": "Apple Development",
Expand Down
95 changes: 95 additions & 0 deletions App/Resources/ChaGok.icon/Assets/app icon clear.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 42 additions & 0 deletions App/Resources/ChaGok.icon/icon.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"fill" : {
"linear-gradient" : [
"display-p3:0.09571,0.08425,0.17449,1.00000",
"display-p3:0.15367,0.10316,0.53703,1.00000"
],
"orientation" : {
"start" : {
"x" : 0.5,
"y" : 0
},
"stop" : {
"x" : 0.5,
"y" : 0.7
}
}
},
"groups" : [
{
"layers" : [
{
"image-name" : "app icon clear.svg",
"name" : "app icon clear"
}
],
"shadow" : {
"kind" : "neutral",
"opacity" : 0.5
},
"translucency" : {
"enabled" : true,
"value" : 0.5
}
}
],
"supported-platforms" : {
"circles" : [
"watchOS"
],
"squares" : "shared"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,22 @@ public actor MLXModelProvider: MLXModelDataSource {
public func download(
progressHandler: @Sendable @escaping (Progress) -> Void
) async throws(MLXModelDataSourceError) {
#if DEBUG
// ⚠️ 디버깅용 시뮬레이션: 에러 상황별 핸들링을 안전하게 테스트하기 위한 디버그 스위치입니다.
try? await Task.sleep(nanoseconds: 2 * 1_000_000_000)

// [옵션 1] 네트워크 오류 시뮬레이션 (networkFailed)
// -> 활성화 시 "네트워크 연결이 유실되었습니다" 문구가 노출됩니다.
// throw URLError(.notConnectedToInternet)

// [옵션 2] 알 수 없는 시스템 오류 시뮬레이션 (unknown)
// -> 활성화 시 "다운로드에 실패했습니다" 문구와 상세 에러 문구가 노출됩니다.
throw .unknown(NSError(
domain: "SimulatedErrorDomain",
code: 999,
userInfo: [NSLocalizedDescriptionKey: "알 수 없는 기기 내부 디스크 쓰기 오류가 발생했습니다. (Simulated)"]
))
#endif
// #if DEBUG
// // ⚠️ 디버깅용 시뮬레이션: 에러 상황별 핸들링을 안전하게 테스트하기 위한 디버그 스위치입니다.
// try? await Task.sleep(nanoseconds: 2 * 1_000_000_000)
//
// // [옵션 1] 네트워크 오류 시뮬레이션 (networkFailed)
// // -> 활성화 시 "네트워크 연결이 유실되었습니다" 문구가 노출됩니다.
// // throw URLError(.notConnectedToInternet)
//
// // [옵션 2] 알 수 없는 시스템 오류 시뮬레이션 (unknown)
// // -> 활성화 시 "다운로드에 실패했습니다" 문구와 상세 에러 문구가 노출됩니다.
// throw .unknown(NSError(
// domain: "SimulatedErrorDomain",
// code: 999,
// userInfo: [NSLocalizedDescriptionKey: "알 수 없는 기기 내부 디스크 쓰기 오류가 발생했습니다. (Simulated)"]
// ))
// #endif
Comment thread
Kimyonhae marked this conversation as resolved.
do {
let model: ChaGokModel = ChaGokModelSupport.current.model
let configuration = try matchModelConfiguration(model: model)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,22 +33,22 @@ public actor WhisperKitProvider: WhisperDataSource {
AppLogger.info("WhisperKit 추천 모델 : \(recommendedModel)")
AppLogger.info("WhisperKit 모델 다운로드 시작")

#if DEBUG
// ⚠️ 디버깅용 시뮬레이션: 에러 상황별 핸들링을 안전하게 테스트하기 위한 디버그 스위치입니다.
try await Task.sleep(nanoseconds: 2 * 1_000_000_000)

// [옵션 1] 네트워크 오류 시뮬레이션 (networkFailed)
// -> 활성화 시 "네트워크 연결이 유실되었습니다" 문구가 노출됩니다.
// throw URLError(.notConnectedToInternet)

// [옵션 2] 알 수 없는 시스템 오류 시뮬레이션 (unknown)
// -> 활성화 시 "다운로드에 실패했습니다" 문구와 상세 에러 문구가 노출됩니다.
throw NSError(
domain: "SimulatedErrorDomain",
code: 999,
userInfo: [NSLocalizedDescriptionKey: "알 수 없는 기기 내부 디스크 쓰기 오류가 발생했습니다. (Simulated)"]
)
#endif
// #if DEBUG
// // ⚠️ 디버깅용 시뮬레이션: 에러 상황별 핸들링을 안전하게 테스트하기 위한 디버그 스위치입니다.
// try await Task.sleep(nanoseconds: 2 * 1_000_000_000)
//
// // [옵션 1] 네트워크 오류 시뮬레이션 (networkFailed)
// // -> 활성화 시 "네트워크 연결이 유실되었습니다" 문구가 노출됩니다.
// // throw URLError(.notConnectedToInternet)
//
// // [옵션 2] 알 수 없는 시스템 오류 시뮬레이션 (unknown)
// // -> 활성화 시 "다운로드에 실패했습니다" 문구와 상세 에러 문구가 노출됩니다.
// throw NSError(
// domain: "SimulatedErrorDomain",
// code: 999,
// userInfo: [NSLocalizedDescriptionKey: "알 수 없는 기기 내부 디스크 쓰기 오류가 발생했습니다. (Simulated)"]
// )
// #endif
Comment thread
Kimyonhae marked this conversation as resolved.

let path = try await WhisperKit.download(
variant: recommendedModel,
Expand Down
Loading