Repository navigation
Conversation
테스트 커버리지 리포트
Generated by CI on 2026-11-18 19:26 KST |
서버는 등록된 기기가 없으면 앱 내 알림도 만들지 않으므로, 권한을 거절한 사용자도 APNs·FCM 등록은 돼 있어야 한다(V1 parity). 미결정이면 권한을 요청하되 결과와 상관없이 registerForRemoteNotifications를 부른다. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
configure·delegate 두 등록 지점이 같은 registerIfLoggedIn을 쓰게 한다. 등록 훅이 성공 여부를 돌려주게 바꿔, 성공한 토큰만 기억하고 실패한 토큰은 다음 기회에 다시 보낸다. 기록은 configure(세션 시작·종료)마다 비워 로그아웃 → 재로그인 시 다시 등록된다. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Firebase delegate는 앱 시작 시 1회와 토큰이 실제로 바뀔 때만 불려, 실행 중 로그아웃 → 재로그인·로그아웃 상태로 켬 → 로그인에서 등록이 다음 실행까지 빠졌다(실기기 실측). 메인 탭 진입마다 오는 didRegister 콜백에서 token()을 직접 조회해 등록한다. 낡은 캐시 토큰은 Firebase가 재발급한다. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
런치 시점엔 APNs 토큰이 아직 없어 Firebase token()이 실기기에서 항상 실패했다(실측). 등록은 App 푸시 허브가 APNs 토큰 수신 직후에 맡으므로 LaunchTaskRepository 포트에서 registerDeviceTokenIfNeeded를 뺀다. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
LaunchTaskRepository 포트에서 등록이 빠졌으므로 구현체의 deviceTokenProvider·PushSettingRepository 의존과 테스트, NotificationDomain 모듈 의존을 함께 걷어낸다. AppDependencies는 해당 인자를 더 넘기지 않는다. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
호출하던 런치 태스크가 사라져 쓰는 곳이 없다. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
"등록 경로는 둘, 둘 다 필요" 설명이 틀려(부트스트랩 pull은 실기기에서 항상 실패) 메인 탭 진입 → APNs → token() 주 경로로 교체한다. delegate 호출 조건, 키체인 토큰 캐시, 권한 무관 등록 이유, 서버의 로그아웃 시 행 삭제, Debug plist 앱 ID 불일치를 함정으로 기록한다. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
💡 Issue
💭 Summary
앱을 켠 채로 로그인·가입하거나 알림 권한을 거절하면 FCM 토큰이 서버(
POST /users/fcm-token)에 등록되지 않던 문제를 고쳐요.서버는 등록된 기기가 없으면 앱 내 알림도 만들지 않아서, 이 경우 푸시와 알림 탭이 모두 비어 있었어요.
🔑 Key Changes
원인 (실기기 실측)
didReceiveRegistrationToken은 앱 시작 시 캐시 토큰으로 1번, 그리고 토큰이 실제로 바뀔 때만 불려요.deviceIdentifier기준).token()조회는 항상 실패했어요.새 등록 흐름
token()직접 조회 → 서버 등록"이에요.MainTabView가 진입할 때마다registerForRemoteNotifications()를 불러요. 알림 권한 결과와 무관해요.didRegister…를 다시 주므로,setAPNSToken직후token()을 조회해 등록해요.PushNotificationCenter한 헬퍼(registerLatestTokenIfNeeded)로 모았어요.configure, 포그라운드 복귀 네 가지예요.AppDependencies를 재조립하지 않아서,ContentView.finishOnboarding에서 직접 비워요.제거
registerDeviceTokenIfNeeded)을 뺐어요.currentDevicePushToken()을 지웠어요.문서
Projects/App/CLAUDE.md푸시 배선 절에 새 등록 경로와 실측 함정을 적었어요.token()실패, 서버의 로그아웃 시 행 삭제, 요청 직렬화, 기록 초기화 시점이에요.CLAUDE.md에 "FCM 등록을 부수 태스크로 되살리지 말 것"을 남겼어요.📱 Simulation
해당 없음 (UI 변경 없음)
🧑🧒🧒 To Reviewer
검증
의도된 결정
분리한 작업
리뷰에서 남긴 Nit
token()을 다시 조회하지 않아요.token()만 실패하고 옛 캐시 토큰 등록은 성공한 드문 경우, 다음 메인 진입까지 옛 토큰이 남아요.token()을 부를 때마다 재발급될 수 있어([Setting] Debug 빌드 Firebase plist 번들 정리 — FCM 토큰 매 실행 재발급 해소 #288) 이번엔 넣지 않았어요.ContentView의@State private var dependencies = AppDependencies()는ContentView가 다시 만들어질 때마다 평가돼요.configure가 멱등이 아니라서, 앱 body가 상태를 읽게 바뀌면 기록 초기화와 중복 POST가 생길 수 있어요.App/CLAUDE.md에 경고를 남겼어요.※ Reference
🤖 Generated with Claude Code