Repository navigation
[NM-560] 식별 · 타이머 완료 후 스토어 리뷰 요청 - #200
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
LiveActivityIntent 는 앱 프로세스에서 실행되는데 TimerWidgetStopIntent 가 위젯 타깃에만 있어 잠금화면 위젯으로 시작한 타이머를 앱 밖에서 끄면 저장소에 남고 timer_complete · 리뷰 요청이 빠졌다. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
6 tasks done
위젯만 며칠 쓰고 앱을 열면 앱을 연 하루로만 세져 묶음 2(최근 7일 중 3일)를 못 채웠다. 큐에 남은 위젯 시작 · 앱 밖 완료 시각과 워치 사용 시각을 그날로 센다. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
위젯으로 타이머를 쓴 날은 앱을 쓴 날로 본다 — 위젯으로 먼저 쓰고 앱은 나중에 열어도 그 위젯 사용이 첫 사용이다. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…re-review # Conflicts: # Projects/Features/DrugIdentificationFeature/Sources/DrugIdentificationScene/VC/DrugIdentificationVC.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
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.
변경 요약
식별 · 타이머를 끝낸 뒤 조건을 보고 앱스토어 평가 창을 요청한다. 창을 띄울지는 OS가 정한다.
기록에 관한건 UserDefaults에 json 형태로 저장
변경 내용
Core/StoreReview/StoreReview.swift새 파일StoreReviewPolicy: 묶음 1 · 2 · 3 + 마지막 요청 후 30일. 화면과 떼어 순수 함수로 둠StoreReview: 기록(UserDefaults, 기기에만) · 판단 · 요청(AppStore.requestReview(in:))완료직후 / 앱 밖(시스템 알람 · 워치)에서 끝내면 다음에 앱을 열 때(콜드런치는 탭바가 뜬 뒤)sceneDidBecomeActive가 받은 씬에 띄우고, 씬이 없으면 표시를 남겨 다음 활성화 때 본다SceneDelegate.sceneDidBecomeActiveDefaultTimerUseCase.timerStarted(앱 · 워치 · 위젯 딥링크) + 위젯 백그라운드 시작은 지연 분석 큐를 꺼낼 때DrugIdentificationVC.allConfirmedUnedited(): 확정한 알약 조건이 모두 모델값. 수동 추가는 수정으로 본다presentLimitAlert참고
테스트
StoreReviewPolicyTests14개(묶음별 · 묶음 1은 식별 · 묶음 3은 타이머 시점만 · 30일 · 7일 창 · 위젯만 3일 쓰고 4일째 열기 · 앱 밖 완료는 띄울 씬이 없으면 남김)타이머
완료완료완료— 조건 미달시작 횟수는 앱 · 위젯 딥링크 · 워치에서 바로, 잠금화면 위젯은 다음 앱 활성화 때 큐에서 올라갔다.
식별
위젯 사용일 — 위젯으로 3 · 2 · 1일 전에 쓰고 오늘 앱을 처음 연 상황: ✅ 콜드런치에 뜸. 쓴 날 4일(같은 날 시작 · 완료는 하루), 첫 사용이 3일 전으로 당겨짐. 수정 전이면 쓴 날이 하루라 안 뜨는 상황
테스트 방법 — 3일 · 30일 조건은 앱을 끈 상태에서 기기의 리뷰 기록(
storeReview.record)을 고치고 cfprefsd 를 재시작해 만들었다. 앱 실행 중defaults write로 바꾸면 앱에 반영되지 않을 때가 있어 쓰지 않았다.체크리스트
[NM-XXX] 요약형식<type>/NM-XXX-요약형식[NM-XXX] type: 요약형식함께 고친 기존 버그 — 위젯으로 시작한 타이머를 잠금화면에서 꺼도 앱에 남는다
timer_complete· 리뷰 요청이 빠졌다완료버튼은 예약할 때 정한 인텐트를 이름으로 찾아 앱에서 실행한다. 위젯이 예약한 알람의TimerWidgetStopIntent는 위젯에만 있어 앱이 찾지 못했다(Could not find an intent with identifier TimerWidgetStopIntent)App/Sources/Widget/TimerWidgetStopIntent.swiftTimerStopIntentTimerWidgetStopIntent둘 다 하는 일(타이머 삭제 · 완료 기록)은 같다. 위젯은
TimerFeature를 링크하지 않아 따로 만들었고, 위젯 · 앱 정의의 이름 · 매개변수가 같아야 한다.다만 두 인텐트는 합치는 것이 가능해 불필요한 분기이다.