Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds Firebase/APNs-based push notification wiring to the iOS app, including app-launch registration setup and server-side FCM token lifecycle hooks around login/logout. It fits into the existing auth/app-flow code by registering a device token after login, removing it on logout, and enabling the app-level Firebase messaging integration needed to receive push notifications.
Changes:
- Add Firebase Messaging setup via a new
AppDelegate, app lifecycle hook, plist/entitlement updates, and SwiftPM dependencies. - Introduce
FCMServiceandFCMManagerto register/delete FCM tokens with the backend and handle notification responses. - Trigger token registration after login and attempt token deletion during logout.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
KillingPart/ViewModels/AppViewModel.swift |
Triggers pending FCM token registration after login success. |
KillingPart/Services/FCMService.swift |
Adds backend API client wrapper for FCM token register/delete endpoints. |
KillingPart/Services/FCMManager.swift |
Adds token orchestration, local pending-token storage, and notification response handling. |
KillingPart/Services/AuthenticationService.swift |
Hooks FCM token deletion into logout flow. |
KillingPart/Services/AppDelegate.swift |
Configures Firebase, notification permissions, APNs registration, and FCM delegate callbacks. |
KillingPart/KillingPartApp.swift |
Adopts the new UIKit app delegate from SwiftUI app entry. |
KillingPart/KillingPart.entitlements |
Enables push notification entitlements. |
KillingPart/Info.plist |
Adds background remote-notification mode and disables Firebase app-delegate proxying. |
KillingPart/GoogleService-Info.plist |
Adds Firebase app configuration plist required by FirebaseApp.configure(). |
KillingPart.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved |
Locks newly added Firebase-related Swift package dependencies. |
KillingPart.xcodeproj/project.pbxproj |
Wires Firebase packages into the Xcode project target. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+20
to
+22
| guard Messaging.messaging().apnsToken != nil else { | ||
| print("[FCM] APNs 미연결 — 토큰 무시 (APNs 연결 후 재발급됨)") | ||
| return |
| do { | ||
| try await fcmService.registerToken(token) | ||
| UserDefaults.standard.removeObject(forKey: pendingTokenKey) | ||
| } catch { |
|
|
||
| func logout() async throws { | ||
| do { | ||
| try? await FCMManager.shared.deleteToken() |
Comment on lines
+5
to
+12
| <key>aps-environment</key> | ||
| <string>development</string> | ||
| <key>com.apple.developer.applesignin</key> | ||
| <array> | ||
| <string>Default</string> | ||
| </array> | ||
| <key>com.apple.developer.aps-environment</key> | ||
| <string>development</string> |
| self.loginViewModel = loginViewModel | ||
| self.loginViewModel.onLoginSuccess = { [weak self] _ in | ||
| Task { @MainActor [weak self] in | ||
| FCMManager.shared.registerPendingTokenIfNeeded() |
Comment on lines
+107
to
+111
| print("[FCM][4] FCM 토큰: \(token)") | ||
| FCMManager.shared.didReceiveToken(token) | ||
| } | ||
| } | ||
|
|
mark77234
added a commit
that referenced
this pull request
May 9, 2026
* feat - 푸시알림 작업 (#80) * feat(FCM): FCM Token 발급 및 등록/삭제 API 연동 * fix(FCM): 기존 컨벤션 적용 * fix(fcm): 테스트버전 체크 * feat - 구글로그인 추가 (#83) * feat(Google): 구글로그인 추가 * feat(1.1.10): 버전 업데이트 * Feat/82 (#84) * fix(ProfileCard): Tag, StatItem FixedSize Added * feat(Settings): 프로필 설정 섹션 -> 프로필 페이지로 마이그레이션 * feat(Setting): 디자인 업데이트 * feat(Setting): NameEdit, TagEdit UI Update and SettingsView Space Added * feat(Block): Block Api Settings * feat(Blocklist): 차단 목록 추가 및 차단 해제 API 추가 및 연동 및 페이지 추가 * feat: 다이얼로그, 바텀시트 디자인 업데이트 * feat(AppInfo,Account): 앱 정보 섹션 및 계정 섹션 추가 * feat(Settings): 카드 크기 동일하게 구현 * feat(Survey): 문의 카드 추가 * feat(Survey): 문의 카드 디자인 개선 * feat(Notification): 알림설정 추가 * feat(Settings): 차단리스트, 이름설정, 프로필이미지, 태그설정 페이지 헤더 크기 줄이기 * feat(Noti): 알림카드 세로여백 조정
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.
작업 내용