-
Notifications
You must be signed in to change notification settings - Fork 1
Merge release/3.1.0 into develop
#153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 5 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
3ba6298
[아이템] 동물의숲 3.0.0 업데이트 대응 (#150)
leeari95 297aaf5
[카탈로그] 아이템의 종류나 색상을 수집 상태를 기록할 수 있는 기능 추가 (#151)
leeari95 bec753e
chore: bump marketing version to 3.1.0
github-actions[bot] a4251d2
♻️ [refactor] 코드리뷰 반영 - CoreData 중복 저장 제거 및 entity 삭제 로직 개선
leeari95 2f7de3d
🐛 [fix] 코드리뷰 반영 - CoreData 마이그레이션 및 race condition 수정
leeari95 02acd4a
🔧 [chore] 게임 데이터 버전 업데이트
leeari95 217666f
🐛 [fix] VillagerHouseView topAnchor constraint 조정
leeari95 489bfe3
✨ [feat] RxSwift retry 오퍼레이터로 네트워크 재시도 로직 구현
leeari95 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,2 @@ | ||
| // 배포 버전 제어용. 워크플로우에서 TARGET_VERSION 값을 덮어씁니다. | ||
| TARGET_VERSION = 3.0.1 | ||
| TARGET_VERSION = 3.1.0 |
21 changes: 21 additions & 0 deletions
21
...iki/Projects/App/Resources/Assets.xcassets/icons/icon-hoteltickets.imageset/Contents.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| { | ||
| "images" : [ | ||
| { | ||
| "idiom" : "universal", | ||
| "scale" : "1x" | ||
| }, | ||
| { | ||
| "filename" : "icon-hoteltickets.png", | ||
| "idiom" : "universal", | ||
| "scale" : "2x" | ||
| }, | ||
| { | ||
| "idiom" : "universal", | ||
| "scale" : "3x" | ||
| } | ||
| ], | ||
| "info" : { | ||
| "author" : "xcode", | ||
| "version" : 1 | ||
| } | ||
| } |
Binary file added
BIN
+5.74 KB
...esources/Assets.xcassets/icons/icon-hoteltickets.imageset/icon-hoteltickets.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
132 changes: 132 additions & 0 deletions
132
...g-Wiki/Projects/App/Sources/CoreDataStorage/VariantsStorage/CoreDataVariantsStorage.swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,132 @@ | ||
| // | ||
| // CoreDataVariantsStorage.swift | ||
| // Animal-Crossing-Wiki | ||
| // | ||
| // Created by Claude Code on 2026/02/01. | ||
| // | ||
|
|
||
| import Foundation | ||
| import RxSwift | ||
|
|
||
| final class CoreDataVariantsStorage: VariantsStorage { | ||
|
|
||
| private let coreDataStorage: CoreDataStorage | ||
|
|
||
| init(coreDataStorage: CoreDataStorage = CoreDataStorage.shared) { | ||
| self.coreDataStorage = coreDataStorage | ||
| } | ||
|
|
||
| func fetch() -> Single<Set<String>> { | ||
| return Single.create { single in | ||
| self.coreDataStorage.performBackgroundTask { context in | ||
| do { | ||
| let object = try self.coreDataStorage.getUserCollection(context) | ||
| let variantEntities = object.variants?.allObjects as? [VariantCollectionEntity] ?? [] | ||
| let variantIds = Set(variantEntities.compactMap { $0.variantId }) | ||
| single(.success(variantIds)) | ||
| } catch { | ||
| single(.failure(CoreDataStorageError.readError(error))) | ||
| } | ||
| } | ||
| return Disposables.create() | ||
| } | ||
| } | ||
|
|
||
| func fetchByItem(_ itemName: String) -> Single<Set<String>> { | ||
| return Single.create { single in | ||
| self.coreDataStorage.performBackgroundTask { context in | ||
| do { | ||
| let object = try self.coreDataStorage.getUserCollection(context) | ||
| let variantEntities = object.variants?.allObjects as? [VariantCollectionEntity] ?? [] | ||
| let variantIds = Set(variantEntities | ||
| .filter { $0.itemName == itemName } | ||
| .compactMap { $0.variantId }) | ||
| single(.success(variantIds)) | ||
| } catch { | ||
| single(.failure(CoreDataStorageError.readError(error))) | ||
| } | ||
| } | ||
| return Disposables.create() | ||
| } | ||
| } | ||
|
|
||
| func fetchAll() -> Single<[String: Set<String>]> { | ||
| return Single.create { single in | ||
| self.coreDataStorage.performBackgroundTask { context in | ||
| do { | ||
| let object = try self.coreDataStorage.getUserCollection(context) | ||
| let variantEntities = object.variants?.allObjects as? [VariantCollectionEntity] ?? [] | ||
|
|
||
| var variantsByItem: [String: Set<String>] = [:] | ||
| for entity in variantEntities { | ||
| guard let itemName = entity.itemName, let variantId = entity.variantId else { continue } | ||
| variantsByItem[itemName, default: []].insert(variantId) | ||
| } | ||
|
|
||
| single(.success(variantsByItem)) | ||
| } catch { | ||
| single(.failure(CoreDataStorageError.readError(error))) | ||
| } | ||
| } | ||
| return Disposables.create() | ||
| } | ||
| } | ||
|
|
||
| func add(_ variantId: String, itemName: String) { | ||
| coreDataStorage.performBackgroundTask { context in | ||
| do { | ||
| let object = try self.coreDataStorage.getUserCollection(context) | ||
| let variants = object.variants?.allObjects as? [VariantCollectionEntity] ?? [] | ||
|
|
||
| if variants.contains(where: { $0.variantId == variantId }) { | ||
| return | ||
| } | ||
|
|
||
| let newVariant = VariantCollectionEntity(context: context) | ||
| newVariant.variantId = variantId | ||
| newVariant.itemName = itemName | ||
| object.addToVariants(newVariant) | ||
|
|
||
| context.saveContext() | ||
| } catch { | ||
| debugPrint(error) | ||
| } | ||
| } | ||
| } | ||
|
|
||
| func remove(_ variantId: String) { | ||
| coreDataStorage.performBackgroundTask { context in | ||
| do { | ||
| let object = try self.coreDataStorage.getUserCollection(context) | ||
| let variants = object.variants?.allObjects as? [VariantCollectionEntity] ?? [] | ||
|
|
||
| if let variant = variants.first(where: { $0.variantId == variantId }) { | ||
| object.removeFromVariants(variant) | ||
| context.delete(variant) | ||
| context.saveContext() | ||
| } | ||
| } catch { | ||
| debugPrint(error) | ||
| } | ||
| } | ||
| } | ||
|
|
||
| func removeAll(for itemName: String) { | ||
| coreDataStorage.performBackgroundTask { context in | ||
| do { | ||
| let object = try self.coreDataStorage.getUserCollection(context) | ||
| let allVariants = object.variants?.allObjects as? [VariantCollectionEntity] ?? [] | ||
| let variantsToRemove = allVariants.filter { $0.itemName == itemName } | ||
|
|
||
| variantsToRemove.forEach { variant in | ||
| object.removeFromVariants(variant) | ||
| context.delete(variant) | ||
| } | ||
|
|
||
| context.saveContext() | ||
| } catch { | ||
| debugPrint(error) | ||
| } | ||
| } | ||
| } | ||
| } |
18 changes: 18 additions & 0 deletions
18
...-Crossing-Wiki/Projects/App/Sources/CoreDataStorage/VariantsStorage/VariantsStorage.swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| // | ||
| // VariantsStorage.swift | ||
| // Animal-Crossing-Wiki | ||
| // | ||
| // Created by Claude Code on 2026/02/01. | ||
| // | ||
|
|
||
| import Foundation | ||
| import RxSwift | ||
|
|
||
| protocol VariantsStorage { | ||
| func fetch() -> Single<Set<String>> | ||
| func fetchByItem(_ itemName: String) -> Single<Set<String>> | ||
| func fetchAll() -> Single<[String: Set<String>]> | ||
| func add(_ variantId: String, itemName: String) | ||
| func remove(_ variantId: String) | ||
| func removeAll(for itemName: String) | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.