From e7b3242cdfcbba16c7f6e8d4c4de83b489fb165e Mon Sep 17 00:00:00 2001 From: seungyooooong Date: Thu, 10 Sep 2026 09:19:39 +0900 Subject: [PATCH 1/2] chore: 2.2.0 -> 2.2.1 version up --- Daily.xcodeproj/project.pbxproj | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Daily.xcodeproj/project.pbxproj b/Daily.xcodeproj/project.pbxproj index 777367c..8f958c6 100644 --- a/Daily.xcodeproj/project.pbxproj +++ b/Daily.xcodeproj/project.pbxproj @@ -1238,7 +1238,7 @@ LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks"; MACOSX_DEPLOYMENT_TARGET = 12.3; - MARKETING_VERSION = 2.2.0; + MARKETING_VERSION = 2.2.1; PRODUCT_BUNDLE_IDENTIFIER = com.seungyong96.Daily; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = auto; @@ -1283,7 +1283,7 @@ LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks"; MACOSX_DEPLOYMENT_TARGET = 12.3; - MARKETING_VERSION = 2.2.0; + MARKETING_VERSION = 2.2.1; PRODUCT_BUNDLE_IDENTIFIER = com.seungyong96.Daily; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = auto; @@ -1318,7 +1318,7 @@ "@executable_path/../../Frameworks", ); LOCALIZATION_PREFERS_STRING_CATALOGS = YES; - MARKETING_VERSION = 2.2.0; + MARKETING_VERSION = 2.2.1; PRODUCT_BUNDLE_IDENTIFIER = com.seungyong96.Daily.DailyWidget; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; @@ -1356,7 +1356,7 @@ "@executable_path/../../Frameworks", ); LOCALIZATION_PREFERS_STRING_CATALOGS = YES; - MARKETING_VERSION = 2.2.0; + MARKETING_VERSION = 2.2.1; PRODUCT_BUNDLE_IDENTIFIER = com.seungyong96.Daily.DailyWidget; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; From f77d21dde0564b68f5f849a1af47dc35c788f736 Mon Sep 17 00:00:00 2001 From: seungyooooong Date: Thu, 10 Sep 2026 10:08:54 +0900 Subject: [PATCH 2/2] =?UTF-8?q?feat=20#227:=20VersionTypes=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Daily.xcodeproj/project.pbxproj | 4 +++ .../Domain/Entities/Enums/VersionTypes.swift | 14 ++++++++++ Daily/Domain/Usecases/AppLaunchUseCase.swift | 26 ++++++++++++++----- .../Presentation/Splash/SplashViewModel.swift | 2 +- 4 files changed, 38 insertions(+), 8 deletions(-) create mode 100644 Daily/Domain/Entities/Enums/VersionTypes.swift diff --git a/Daily.xcodeproj/project.pbxproj b/Daily.xcodeproj/project.pbxproj index 8f958c6..c182868 100644 --- a/Daily.xcodeproj/project.pbxproj +++ b/Daily.xcodeproj/project.pbxproj @@ -100,6 +100,7 @@ F6B151702EDD2A1C00813BAF /* SettingViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = F6B1516F2EDD2A1C00813BAF /* SettingViewModel.swift */; }; F6B151752EDD7B7A00813BAF /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = F6B151732EDD7B7A00813BAF /* Localizable.strings */; }; F6B151782EDD7FB100813BAF /* LanguageManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = F6B151772EDD7FB100813BAF /* LanguageManager.swift */; }; + F6B591F8305234CA00F3EBBA /* VersionTypes.swift in Sources */ = {isa = PBXBuildFile; fileRef = F6B591F7305234CA00F3EBBA /* VersionTypes.swift */; }; F6BEC935290F5894005EAF28 /* DailyApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = F6BEC934290F5894005EAF28 /* DailyApp.swift */; }; F6BEC939290F5895005EAF28 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F6BEC938290F5895005EAF28 /* Assets.xcassets */; }; F6BEC93D290F5895005EAF28 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F6BEC93C290F5895005EAF28 /* Preview Assets.xcassets */; }; @@ -273,6 +274,7 @@ F6B151742EDD7B7A00813BAF /* ko */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ko; path = ko.lproj/Localizable.strings; sourceTree = ""; }; F6B151762EDD7BA400813BAF /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; }; F6B151772EDD7FB100813BAF /* LanguageManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LanguageManager.swift; sourceTree = ""; }; + F6B591F7305234CA00F3EBBA /* VersionTypes.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VersionTypes.swift; sourceTree = ""; }; F6BEC931290F5894005EAF28 /* Daily.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Daily.app; sourceTree = BUILT_PRODUCTS_DIR; }; F6BEC934290F5894005EAF28 /* DailyApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DailyApp.swift; sourceTree = ""; }; F6BEC938290F5895005EAF28 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; @@ -771,6 +773,7 @@ F6DB67A42F34670C0088893B /* Notifications.swift */, F6573325304669EE00C641F8 /* DeleteScope.swift */, F65733273046774E00C641F8 /* StatisticsTypes.swift */, + F6B591F7305234CA00F3EBBA /* VersionTypes.swift */, ); path = Enums; sourceTree = ""; @@ -1009,6 +1012,7 @@ F6C6B0342BB424DD00C578C1 /* AppInfoContent.swift in Sources */, F6E1CD782DBC97E6009E25DA /* WeekIndicator.swift in Sources */, F6C6CD912D6B703B00772E59 /* NavigationObject.swift in Sources */, + F6B591F8305234CA00F3EBBA /* VersionTypes.swift in Sources */, F67DD7A82E0E48240001203D /* DailyPicker.swift in Sources */, F6C758D62CCB123700F9CF91 /* CalendarHeader.swift in Sources */, F6E1CCDA2DAEAF88009E25DA /* YearDataModel.swift in Sources */, diff --git a/Daily/Domain/Entities/Enums/VersionTypes.swift b/Daily/Domain/Entities/Enums/VersionTypes.swift new file mode 100644 index 0000000..b01110c --- /dev/null +++ b/Daily/Domain/Entities/Enums/VersionTypes.swift @@ -0,0 +1,14 @@ +// +// VersionTypes.swift +// Daily +// +// Created by seungyooooong on 9/10/26. +// + +import Foundation + +enum VersionTypes: Int { + case major = 0 + case minor = 1 + case patch = 2 +} diff --git a/Daily/Domain/Usecases/AppLaunchUseCase.swift b/Daily/Domain/Usecases/AppLaunchUseCase.swift index 17230ac..aa581ef 100644 --- a/Daily/Domain/Usecases/AppLaunchUseCase.swift +++ b/Daily/Domain/Usecases/AppLaunchUseCase.swift @@ -17,12 +17,16 @@ final class AppLaunchUseCase { extension AppLaunchUseCase { func getNotices() async -> [NoticeModel] { - if let ignoreNoticeDate = UserDefaultManager.ignoreNoticeDate, ignoreNoticeDate >= Date(format: .daily) { return [] } + var notices: Array = [] - let imageName = UserDefaultManager.language == .korean ? "daily_2.2_update" : "daily_2.2_update_en" - let notices = [ - NoticeModel(id: 0, type: .image, image: imageName) - ] + if let ignoreNoticeDate = UserDefaultManager.ignoreNoticeDate, ignoreNoticeDate >= Date(format: .daily) { return notices } + + if await checkUpdate(.patch) { + let imageName = UserDefaultManager.language == .korean ? "daily_2.2_update" : "daily_2.2_update_en" + + notices.append(NoticeModel(id: 0, type: .image, image: imageName)) + + } // MARK: sheet animation을 고려해 0.5초 추가 딜레이 try? await Task.sleep(nanoseconds: 500_000_000) @@ -30,12 +34,20 @@ extension AppLaunchUseCase { return notices } - func checkUpdate() async -> Bool { + func checkUpdate(_ targetVersion: VersionTypes...) async -> Bool { do { let storeVersion = try await System.getStoreVersion().split(separator: ".").map {$0} let appVersion = System.appVersion!.split(separator: ".").map {$0} - return ((storeVersion[0] > appVersion[0]) || (storeVersion[1] > appVersion[1])) + let major = VersionTypes.major.rawValue + let minor = VersionTypes.minor.rawValue + let patch = VersionTypes.patch.rawValue + + return ( + (targetVersion.contains(.major) && (storeVersion[major] > appVersion[major])) || + (targetVersion.contains(.minor) && (storeVersion[minor] > appVersion[minor])) || + (targetVersion.contains(.patch) && (storeVersion[patch] > appVersion[patch])) + ) } catch { return false } diff --git a/Daily/Presentation/Splash/SplashViewModel.swift b/Daily/Presentation/Splash/SplashViewModel.swift index 0330ae0..be8d621 100644 --- a/Daily/Presentation/Splash/SplashViewModel.swift +++ b/Daily/Presentation/Splash/SplashViewModel.swift @@ -26,7 +26,7 @@ final class SplashViewModel: ObservableObject { func onAppear() { Task { @MainActor in - isNeedUpdate = await appLaunchUseCase.checkUpdate() + isNeedUpdate = await appLaunchUseCase.checkUpdate(.major, .minor) if isNeedUpdate { return } CalendarServices.shared.calculateSymbolNum()