[#686] FCM token 동기화 요청을 사용자와 token 기준으로 제한한다#688
Conversation
There was a problem hiding this comment.
Code Review
This pull request optimizes FCM token synchronization by introducing an in-memory cache (lastSyncedKey) to prevent redundant sync requests, updates AppDelegate to trigger APNs registration when entering the foreground, and adds corresponding unit tests. The review feedback suggests removing the in-memory cache to ensure server consistency and avoiding @MainActor isolation on FCMTokenSyncHandler to prevent unnecessary isolation requirements in DI containers.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
🔗 연관된 이슈
🎯 의도
📝 작업 내용
📌 요약
FCMTokenSyncHandler에 마지막 성공 동기화 key 캐시 추가(uid, fcmToken)조합의 반복 저장 방지 테스트 추가🔍 상세
UIApplication.willEnterForegroundNotification을 관찰해.didRequestAPNsRegistration을 전달하도록 변경applicationWillEnterForeground(_:)의존 제거SyncKey(uid:fcmToken:)기준으로 마지막 성공 동기화 상태를 저장updateFCMToken(_:)성공 후에만 캐시를 갱신하도록 처리📸 영상 / 이미지 (Optional)