Conversation
There was a problem hiding this comment.
Pull request overview
This PR implements Kakao social login functionality and updates the login screen UI with a background video and new title image. The implementation follows good architectural patterns by extracting login logic into a dedicated LoginViewModel, separating concerns between the Kakao SDK integration (KakaoLoginService) and backend authentication (AuthenticationService), and properly configuring environment variables through .xcconfig files.
Changes:
- Refactored
AppFlowViewModeltoAppViewModelwith extractedLoginViewModelfor better separation of concerns - Integrated Kakao iOS SDK with proper error handling and async/await patterns
- Redesigned login screen with background video, gradient overlay, and new branding assets
- Added environment configuration support through .xcconfig files for BASE_URL and KAKAO_NATIVE_APP_KEY
Reviewed changes
Copilot reviewed 18 out of 24 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| KillingPart/ViewModels/AppViewModel.swift | New view model that manages app flow and owns LoginViewModel instance |
| KillingPart/ViewModels/LoginViewModel.swift | Extracted login logic with Kakao integration, proper error handling, and state management |
| KillingPart/ViewModels/AppFlowViewModel.swift | Removed in favor of refactored AppViewModel |
| KillingPart/Views/Screens/RootFlowView.swift | Updated to use AppViewModel and pass LoginViewModel to LoginView |
| KillingPart/Views/Screens/Auth/LoginView.swift | Completely redesigned with video background, gradient overlay, and Kakao login button |
| KillingPart/Views/Screens/Auth/Components/LoginBackgroundVideoView.swift | New component implementing looping background video with lifecycle management |
| KillingPart/Views/Screens/Auth/Components/KakaoLoginButton.swift | New Kakao-branded login button with loading state |
| KillingPart/Services/KakaoLoginService.swift | New service wrapping Kakao SDK with proper async/await conversion and error handling |
| KillingPart/Services/AuthenticationService.swift | Extended with Kakao login endpoint integration and debug logging |
| KillingPart/Services/APIConfiguration.swift | New configuration helper for building API endpoints from BASE_URL |
| KillingPart/Models/KakaoSocialLoginModels.swift | Request/response models for Kakao login backend integration |
| KillingPart/KillingPartApp.swift | Added Kakao SDK initialization and URL handling for OAuth callback |
| KillingPart/Info.plist | Added environment variables, URL schemes, and query schemes for Kakao integration |
| KillingPart.xcodeproj/project.pbxproj | Added Kakao SDK dependencies and xcconfig file references |
| .gitignore | Added *.xcconfig to prevent committing secrets |
| KillingPart/Assets.xcassets/Login/* | Added login title images and Kakao bubble icon assets |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| } | ||
| .onChange(of: scenePhase) { phase in | ||
| if phase == .active { | ||
| videoPlayer.play() |
There was a problem hiding this comment.
The onChange handler for scenePhase only plays the video when the app becomes active, but doesn't pause it when the app goes to the background or becomes inactive. This can cause unnecessary battery drain and resource usage. Consider adding an else clause to pause the video when the phase is not active.
| videoPlayer.play() | |
| videoPlayer.play() | |
| } else { | |
| videoPlayer.pause() |
| branch = master; | ||
| kind = branch; |
There was a problem hiding this comment.
The Kakao SDK dependency is pinned to the master branch instead of a specific version. This can lead to unexpected breaking changes when the dependency updates automatically. Consider pinning to a specific version tag or at minimum using a version range to ensure stability and reproducible builds.
| branch = master; | |
| kind = branch; | |
| kind = exactVersion; | |
| version = 2.21.0; |
| #if canImport(UIKit) | ||
| .onReceive(NotificationCenter.default.publisher(for: UIApplication.didBecomeActiveNotification)) { _ in | ||
| videoPlayer.play() | ||
| } | ||
| #endif |
There was a problem hiding this comment.
There is redundant handling of app activation. Both the onChange(of: scenePhase) modifier (line 28-32) and the onReceive UIApplication.didBecomeActiveNotification (line 34-36) will trigger videoPlayer.play() when the app becomes active. This can cause the play() method to be called twice unnecessarily. Consider removing one of these handlers or consolidating the logic.
| #if canImport(UIKit) | |
| .onReceive(NotificationCenter.default.publisher(for: UIApplication.didBecomeActiveNotification)) { _ in | |
| videoPlayer.play() | |
| } | |
| #endif |
작업내용
남은작업
서버 카카오 로그인 403 이슈 대응 이후
/api/jwt/exchange액세스 만료는 401? 리프래시 만료 응답상태코드?