Conversation
📝 WalkthroughWalkthrough스플래시 화면 기능을 추가합니다: 그래디언트 색상 및 앱 아이콘 자산을 추가하고, AppState에 Changes
Sequence DiagramsequenceDiagram
participant App as App Launch
participant AC as AppCoordinator
participant ACV as AppCoordinatorView
participant SV as SplashView
participant ON as OnboardingView
App->>AC: 초기화 (appState = .splash)
AC->>ACV: appState 발행
ACV->>SV: .splash로 SplashView 렌더링
SV->>SV: onAppear → 3초 타이머 시작
SV->>AC: 3초 후 navigationToOnboarding()
AC->>AC: appState = .onboarding 설정
AC->>ACV: appState 발행
ACV->>ON: OnboardingView 렌더링
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro 📒 Files selected for processing (2)
🧰 Additional context used🧬 Code graph analysis (1)Cherrish-iOS/Cherrish-iOS/Presentation/Feature/Onboarding/SplashView.swift (2)
🔇 Additional comments (1)
✏️ Tip: You can disable this entire section by setting Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@Cherrish-iOS/Cherrish-iOS/Presentation/Feature/Onboarding/SplashView.swift`:
- Around line 26-30: Replace the DispatchQueue-based delay in SplashView's
onAppear with a Swift concurrency Task tied to the view lifecycle so it cancels
when the view disappears: remove the DispatchQueue.main.asyncAfter block and use
a .task (or Task in onAppear tied to the view) that awaits Task.sleep for 3
seconds (3_000_000_000 nanoseconds) then calls
appCoordinator.navigationToOnboarding() on the MainActor; ensure you use
try/await and MainActor.run (or `@MainActor`) when invoking
appCoordinator.navigationToOnboarding to keep UI work on the main thread.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
⛔ Files ignored due to path filters (3)
Cherrish-iOS/Cherrish-iOS/Assets.xcassets/splash/appicon.imageset/splash_logo.pngis excluded by!**/*.pngCherrish-iOS/Cherrish-iOS/Assets.xcassets/splash/appicon.imageset/splash_logo@2x.pngis excluded by!**/*.pngCherrish-iOS/Cherrish-iOS/Assets.xcassets/splash/appicon.imageset/splash_logo@3x.pngis excluded by!**/*.png
📒 Files selected for processing (7)
Cherrish-iOS/Cherrish-iOS/Assets.xcassets/Color/splash_gradient_1.colorset/Contents.jsonCherrish-iOS/Cherrish-iOS/Assets.xcassets/Color/splash_gradient_2.colorset/Contents.jsonCherrish-iOS/Cherrish-iOS/Assets.xcassets/splash/Contents.jsonCherrish-iOS/Cherrish-iOS/Assets.xcassets/splash/appicon.imageset/Contents.jsonCherrish-iOS/Cherrish-iOS/Presentation/Coordinator/AppCoordinator.swiftCherrish-iOS/Cherrish-iOS/Presentation/Coordinator/AppCoordinatorView.swiftCherrish-iOS/Cherrish-iOS/Presentation/Feature/Onboarding/SplashView.swift
🧰 Additional context used
🧬 Code graph analysis (1)
Cherrish-iOS/Cherrish-iOS/Presentation/Feature/Onboarding/SplashView.swift (2)
Cherrish-iOS/Cherrish-iOS/Presentation/Global/Extension/View+Shadow.swift (1)
body(9-17)Cherrish-iOS/Cherrish-iOS/Presentation/Coordinator/AppCoordinator.swift (1)
navigationToOnboarding(26-29)
🔇 Additional comments (7)
Cherrish-iOS/Cherrish-iOS/Assets.xcassets/splash/appicon.imageset/Contents.json (1)
1-23: 구성 확인 완료스플래시 아이콘 이미지셋의 스케일 정의와 메타데이터가 정상 구성입니다.
Cherrish-iOS/Cherrish-iOS/Assets.xcassets/Color/splash_gradient_2.colorset/Contents.json (1)
1-38: 색상 자산 정의 정상라이트/다크 모드 정의와 메타데이터 구성이 표준 형식으로 잘 들어갔습니다.
Cherrish-iOS/Cherrish-iOS/Presentation/Coordinator/AppCoordinatorView.swift (1)
15-18: 스플래시 라우팅 추가 OK새 앱 상태에 대해 SplashView로 분기되는 로직이 깔끔합니다.
Cherrish-iOS/Cherrish-iOS/Assets.xcassets/splash/Contents.json (1)
1-5: 기본 에셋 카탈로그 메타데이터 정상표준 형식대로 잘 추가되었습니다.
Cherrish-iOS/Cherrish-iOS/Assets.xcassets/Color/splash_gradient_1.colorset/Contents.json (1)
1-38: 그라디언트 색상 자산 추가 정상라이트/다크 모드 대응 정의가 올바릅니다.
Cherrish-iOS/Cherrish-iOS/Presentation/Coordinator/AppCoordinator.swift (1)
11-19: LGTM!
AppState열거형에splash케이스 추가와 초기 상태를.splash로 변경한 것이 적절합니다. 스플래시 → 온보딩 플로우가 명확하게 구현되었습니다.Cherrish-iOS/Cherrish-iOS/Presentation/Feature/Onboarding/SplashView.swift (1)
13-25: LGTM!
ZStack과LinearGradient를 활용한 스플래시 화면 UI 구성이 깔끔합니다. 그래디언트 스탑 위치(0.6, 1.0)도 적절하게 설정되어 있습니다.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
| .onAppear { | ||
| DispatchQueue.main.asyncAfter(deadline: .now() + 3) { | ||
| appCoordinator.navigationToOnboarding() | ||
| } | ||
| } |
There was a problem hiding this comment.
🧹 Nitpick | 🔵 Trivial
뷰 생명주기 관리를 위해 Task 사용을 권장합니다.
DispatchQueue.main.asyncAfter는 뷰가 사라져도 취소되지 않습니다. 뷰가 일찍 해제될 경우 예기치 않은 동작이 발생할 수 있습니다. Task를 사용하면 뷰가 사라질 때 자동으로 취소됩니다.
♻️ 권장 수정안
- .onAppear {
- DispatchQueue.main.asyncAfter(deadline: .now() + 3) {
- appCoordinator.navigationToOnboarding()
- }
- }
+ .task {
+ try? await Task.sleep(nanoseconds: 3_000_000_000)
+ appCoordinator.navigationToOnboarding()
+ }📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| .onAppear { | |
| DispatchQueue.main.asyncAfter(deadline: .now() + 3) { | |
| appCoordinator.navigationToOnboarding() | |
| } | |
| } | |
| .task { | |
| try? await Task.sleep(nanoseconds: 3_000_000_000) | |
| appCoordinator.navigationToOnboarding() | |
| } |
🤖 Prompt for AI Agents
In `@Cherrish-iOS/Cherrish-iOS/Presentation/Feature/Onboarding/SplashView.swift`
around lines 26 - 30, Replace the DispatchQueue-based delay in SplashView's
onAppear with a Swift concurrency Task tied to the view lifecycle so it cancels
when the view disappears: remove the DispatchQueue.main.asyncAfter block and use
a .task (or Task in onAppear tied to the view) that awaits Task.sleep for 3
seconds (3_000_000_000 nanoseconds) then calls
appCoordinator.navigationToOnboarding() on the MainActor; ensure you use
try/await and MainActor.run (or `@MainActor`) when invoking
appCoordinator.navigationToOnboarding to keep UI work on the main thread.


🔗 연결된 이슈
📄 작업 내용