diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 9b319998..78a241ca 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -7,14 +7,6 @@ on: branches: ["main", "staging"] jobs: - list-macos-versions: - runs-on: ubuntu-latest - steps: - - name: Check available macOS versions - run: | - echo "Available macOS versions:" - curl -s https://api.github.com/meta | jq -r '.runner | .macos' - build: name: Build and Test default scheme using any available iPhone simulator runs-on: macos-14 diff --git a/Derived/InfoPlists/DgWidget-Info.plist b/Derived/InfoPlists/DgWidget-Info.plist index 94ed93e3..645b9a9e 100644 --- a/Derived/InfoPlists/DgWidget-Info.plist +++ b/Derived/InfoPlists/DgWidget-Info.plist @@ -17,7 +17,7 @@ CFBundlePackageType XPC! CFBundleShortVersionString - 2.11.0 + 2.10.0 CFBundleVersion 1 NSExtension diff --git a/Derived/InfoPlists/app-Info.plist b/Derived/InfoPlists/app-Info.plist index 2f0f563a..60117b8e 100644 --- a/Derived/InfoPlists/app-Info.plist +++ b/Derived/InfoPlists/app-Info.plist @@ -17,7 +17,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 2.11.0 + 2.10.0 CFBundleURLTypes diff --git a/Project.swift b/Project.swift index 74b7042a..765e25ac 100644 --- a/Project.swift +++ b/Project.swift @@ -3,7 +3,7 @@ import ProjectDescription let projectName = "dg-muscle-ios" let widgetName = "DgWidget" let bundleId = "com.donggyu.dg-muscle-ios" -let appVersion: String = "2.11.0" +let appVersion: String = "2.10.0" enum Layer: String, CaseIterable { case Domain diff --git a/dg-muscle-ios/sources/Presentation/History/View/Form/Manage/ManageRecordViewModel.swift b/dg-muscle-ios/sources/Presentation/History/View/Form/Manage/ManageRecordViewModel.swift index 7ad69e61..44fae39c 100644 --- a/dg-muscle-ios/sources/Presentation/History/View/Form/Manage/ManageRecordViewModel.swift +++ b/dg-muscle-ios/sources/Presentation/History/View/Form/Manage/ManageRecordViewModel.swift @@ -21,7 +21,6 @@ final class ManageRecordViewModel: ObservableObject { @Published var goal: Goal? @Published var strengthGoal: Goal? @Published var traingMode: Common.TrainingMode? - @Published var lastSelectedTime: Int? private let recordId: String private let getHeatMapColorUsecase: GetHeatMapColorUsecase @@ -32,7 +31,6 @@ final class ManageRecordViewModel: ObservableObject { private let subscribeTrainingModeUsecase: SubscribeTrainingModeUsecase private let checkGoalAchievedUsecase: CheckGoalAchievedUsecase private let checkStrengthGoalAchievedUsecase: CheckStrengthGoalAchievedUsecase - private let cancelExerciseTimerUsecase: CancelExerciseTimerUsecase private let registerExerciseTimerUsecase: RegisterExerciseTimerUsecase private var cancellables = Set() @@ -62,7 +60,6 @@ final class ManageRecordViewModel: ObservableObject { subscribeTrainingModeUsecase = .init(userRepository: userRepository) checkGoalAchievedUsecase = .init() checkStrengthGoalAchievedUsecase = .init() - cancelExerciseTimerUsecase = .init(exerciseTimerRepository: exerciseTimerRepository) registerExerciseTimerUsecase = .init(exerciseTimerRepository: exerciseTimerRepository) let color: Common.HeatMapColor = .init(domain: getHeatMapColorUsecase.implement()) @@ -85,32 +82,25 @@ final class ManageRecordViewModel: ObservableObject { Common.PushNotificationManager.shared.delete(ids: ["ExerciseTimer\(i)"]) } - if lastSelectedTime == time { - cancelExerciseTimerUsecase.implement() - lastSelectedTime = nil - } else { - if var date = Calendar.current.date(byAdding: .second, value: time, to: Date()) { - registerExerciseTimerUsecase.implement(timer: .init(targetDate: date)) + if var date = Calendar.current.date(byAdding: .second, value: time, to: Date()) { + registerExerciseTimerUsecase.implement(timer: .init(targetDate: date)) + + for i in (0..<10) { + Common.PushNotificationManager.shared.register( + title: "Ring Ring Ring...", + body: "Tap to stop alarm", + date: date, + id: "ExerciseTimer\(i)", + userInfo: [ + "type": "timer", + "targetDate": date + ] + ) - for i in (0..<10) { - Common.PushNotificationManager.shared.register( - title: "Ring Ring Ring...", - body: "Tap to stop alarm", - date: date, - id: "ExerciseTimer\(i)", - userInfo: [ - "type": "timer", - "targetDate": date - ] - ) - - if let updatedDate = Calendar.current.date(byAdding: .second, value: 3, to: date) { - date = updatedDate - } + if let updatedDate = Calendar.current.date(byAdding: .second, value: 3, to: date) { + date = updatedDate } } - - lastSelectedTime = time } } diff --git a/dg-muscle-ios/sources/Presentation/Main/View/NavigationViewModel.swift b/dg-muscle-ios/sources/Presentation/Main/View/NavigationViewModel.swift index 9a650092..dd375ab7 100644 --- a/dg-muscle-ios/sources/Presentation/Main/View/NavigationViewModel.swift +++ b/dg-muscle-ios/sources/Presentation/Main/View/NavigationViewModel.swift @@ -9,6 +9,7 @@ import Foundation import Domain import Combine import ExerciseTimer +import Common final class NavigationViewModel: ObservableObject { let subscribeExerciseTimerUsecase: SubscribeExerciseTimerUsecase @@ -25,6 +26,9 @@ final class NavigationViewModel: ObservableObject { func cancelTimer() { cancelExerciseTimerUsecase.implement() + for i in (0..<10) { + Common.PushNotificationManager.shared.delete(ids: ["ExerciseTimer\(i)"]) + } } private func bind() {