Repository navigation
[NM-447] 위젯 알람이 무음 설정을 무시하는 버그 수정 - #165
Merged
Merged
Conversation
앱에서 시작하면 RingModeStore 를 보는데(AlarmKitAlarmScheduler), 위젯에서 시작하면 sound: .default 로 못박혀 있어 항상 소리로 울렸다. 야간 병동에서 무음으로 맞춰둔 간호사에게 예고 없이 소리가 난다. 값 자체는 이미 위젯이 닿을 수 있는 곳에 있었다 — RingModeStore 는 앱 그룹 UserDefaults 라 "앱·위젯·익스텐션이 같은 값을 보도록" 만들어 둔 것이다. 닿지 못한 건 두 가지 때문이었다. ① RingModeStore 가 Core 에 있었다 위젯 dependencies 는 [TimerShared, TimerDomain] 뿐이고, Core 를 붙이면 Firebase·GoogleSignIn 까지 익스텐션에 링크된다. Core → TimerShared 로 옮긴다. TimerShared 는 앱과 위젯이 같은 타입을 링크하려고 만든 의존성 없는 leaf 모듈이라 Foundation + UserDefaults 뿐인 이 파일의 제 자리다. TimerFeature 는 이미 TimerShared 를 의존해서 import 한 줄씩만 늘었다. ② silence.caf 가 앱 번들에만 있었다 AlarmKit 의 .named(_:) 는 예약을 건 프로세스의 번들에서 찾으므로, 앱에만 있으면 위젯이 무음 사운드를 못 쓴다. TimerWidget·데모 위젯 타깃에 리소스로 넣는다. 빌드 산출물에서 App.app/PlugIns/TimerWidget.appex/silence.caf 확인. 규칙은 AlarmKitAlarmScheduler 와 동일하게 맞췄다 — 소리=기본 알람음+진동 / 무음=무음 사운드(소리 없음, 시스템 진동은 남음). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ch9vPGGKfeTUWMKEsZ3NWM
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
관련 이슈
변경 요약
위젯에서 시작한 타이머 알람이
sound: .default로 못박혀 있어 무음 설정을 무시했다. 앱과 같은RingModeStore를 보도록 맞춘다.변경 내용
증상 — 앱에서 시작하면 무음을 따르는데(
AlarmKitAlarmScheduler), 위젯에서 시작하면 항상 소리로 울렸다. 야간 병동에서 무음으로 맞춰둔 간호사에게 예고 없이 소리가 난다.값 자체는 이미 위젯이 닿을 수 있는 곳에 있었다 —
RingModeStore는 앱 그룹 UserDefaults 라 주석부터 "앱·위젯·익스텐션이 같은 값을 보도록" 이라고 적혀 있다. 닿지 못한 건 두 가지 때문이었다.①
RingModeStore가Core에 있었다위젯에
Core를 붙이면 Firebase·GoogleSignIn 까지 익스텐션에 링크된다. 그래서Core→TimerShared로 옮겼다.TimerShared는 앱과 위젯이 같은 타입을 링크하려고 만든 의존성 없는 leaf 모듈이고, 이 파일은 Foundation + UserDefaults 뿐이라 그대로 들어간다.TimerFeature는 이미TimerShared를 의존해서import한 줄씩만 늘었다(4개 파일).②
silence.caf가 앱 번들에만 있었다AlarmKit 의
.named(_:)는 예약을 건 프로세스의 번들에서 찾으므로, 앱에만 있으면 위젯이 무음 사운드를 쓸 수 없다.TimerWidget과 데모 위젯 타깃에 리소스로 넣었다.결과
AlarmKitAlarmScheduler와 동일한 규칙 — 소리=기본 알람음+진동 / 무음=무음 사운드(소리 없음, 시스템 진동은 남음).테스트
tuist build App성공App.app/PlugIns/TimerWidget.appex/silence.caf존재. ② 가 실제로 해결됐는지가 이 수정의 핵심 가정이라 빌드 결과로 직접 확인했다실기기 검증이 남았습니다
시뮬레이터에서는 AlarmKit 알람 발화를 끝까지 확인하기 어렵습니다. 아래는 실기기(iOS 26.1+) 로 봐주세요.
특히 3번이 핵심입니다.
.named("silence.caf")의 번들 탐색이 익스텐션 기준이라는 전제로 고쳤는데, 애플 문서가 이를 명시하지 않아 양쪽 번들에 모두 넣는 방식으로 처리했습니다. 실기기에서 무음이 확인되면 전제가 맞은 것입니다.체크리스트
[NM-XXX] 요약형식<type>/NM-XXX-요약형식[NM-XXX] type: 요약형식