공유 딥링크 Firebase Dynamic Links → App Links 전환 - #407
Conversation
- Firebase Dynamic Links 서비스 종료(2025-08-25)로 깨진 공유 기능을 iOS와 동일한 Universal Link 방식(App Links)으로 교체 - SchemeActivity에서 FirebaseDynamicLinks SDK 대신 intent.data로 직접 쿼리 파싱 - CourseDetailActivity/MyDrawDetailActivity 공유 로직을 SDK 호출 없이 고정 URL(runnect-ios.web.app/share) 조립 방식으로 단순화 - AndroidManifest intent-filter를 rnnt.page.link에서 runnect-ios.web.app/share로 변경, autoVerify 추가 - RunnectDynamicLink → RunnectShareLink로 이름 변경, firebase-dynamic-links-ktx 의존성 제거
📝 WalkthroughWalkthroughThe app replaces Firebase Dynamic Links with verified Android App Links. It uses ChangesApp Link sharing migration
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant Android
participant SchemeActivity
participant DetailActivity
participant ShareChooser
Android->>SchemeActivity: Deliver verified /share intent
SchemeActivity->>SchemeActivity: Parse course ID and target
SchemeActivity->>DetailActivity: Open course with fromAppLink
DetailActivity->>ShareChooser: Share RunnectShareLink URL
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@app/src/main/AndroidManifest.xml`:
- Around line 95-97: Update the AndroidManifest deep-link data entry to use
exact path matching for /share by replacing the android:pathPrefix attribute
with android:path. Keep the existing host runnect-ios.web.app unchanged.
- Around line 89-97: Update the VIEW intent-filter in AndroidManifest.xml to use
an exact android:path="/share" instead of android:pathPrefix, matching
RunnectShareLink.BASE_URL and excluding other /share... paths. Verify release
deep-link routing on a physical device, including web or Play Store fallback
when the app is not installed.
In `@app/src/main/java/com/runnect/runnect/presentation/scheme/SchemeActivity.kt`:
- Around line 27-30: Update the logged-out branch in SchemeActivity so
navigateToLoginScreen carries the incoming App Link URI or parsed target into
LoginActivity. Ensure LoginActivity preserves that value and routes to the
target after authentication succeeds, applying the same handling for both public
and private course links when login is required.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 55255841-de21-4cbe-b448-761e5d36a7af
📒 Files selected for processing (6)
app/src/main/AndroidManifest.xmlapp/src/main/java/com/runnect/runnect/presentation/detail/CourseDetailActivity.ktapp/src/main/java/com/runnect/runnect/presentation/scheme/SchemeActivity.ktapp/src/main/java/com/runnect/runnect/presentation/storage/mydrawdetail/MyDrawDetailActivity.ktapp/src/main/java/com/runnect/runnect/util/link/RunnectShareLink.ktgradle/libs.versions.toml
💤 Files with no reviewable changes (1)
- gradle/libs.versions.toml
| if (isUserLoggedIn()) { | ||
| handleDynamicLinks() | ||
| handleAppLink() | ||
| } else { | ||
| navigateToLoginScreen() |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift
Preserve the App Link through the login flow.
When the user is logged out, this branch starts LoginActivity without the incoming URI or parsed target. After authentication, the user cannot continue to the shared course.
Pass the App Link to the login flow and route it after login succeeds. Apply the same behavior to public and private course links if login remains required for both.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@app/src/main/java/com/runnect/runnect/presentation/scheme/SchemeActivity.kt`
around lines 27 - 30, Update the logged-out branch in SchemeActivity so
navigateToLoginScreen carries the incoming App Link URI or parsed target into
LoginActivity. Ensure LoginActivity preserves that value and routes to the
target after authentication succeeds, applying the same handling for both public
and private course links when login is required.
There was a problem hiding this comment.
현재 코드 유지 (범위 밖으로 보류)
지적 자체는 타당하지만, 이 PR이 만든 회귀가 아니라 마이그레이션 이전부터 있던 동작입니다. origin/develop의 마이그레이션 전 SchemeActivity.kt도 동일하게 로그아웃 상태면 링크 정보 없이 LoginActivity로 보냅니다:
git show origin/develop:app/src/main/java/com/runnect/runnect/presentation/scheme/SchemeActivity.kt
...
if (isUserLoggedIn()) {
handleDynamicLinks()
} else {
navigateToLoginScreen() // 링크 정보 전달 없음, 이전부터 동일
}
이번 PR 범위는 Firebase Dynamic Links → App Links 전환이고 navigateToLoginScreen() 자체는 손대지 않았습니다. 로그인 플로우를 거쳐도 딥링크를 보존하는 건 legit한 UX 개선이지만 별도 작업으로 트래킹하는 게 맞다고 판단해 이 PR에서는 다루지 않았습니다.
There was a problem hiding this comment.
@unam98, 확인했습니다. 이 동작은 이번 App Links 전환에서 새로 발생한 회귀가 아닙니다.
현재 PR의 범위를 고려하면 이 코멘트는 블로킹하지 않겠습니다. 로그인 후 App Link를 복원하는 개선은 별도 작업으로 추적하는 것이 적절합니다.
원하시면 PR과 이 코멘트를 연결한 후속 GitHub Issue를 생성하겠습니다.
You are interacting with an AI system.
작업 배경
변경 사항
SchemeActivity.ktFirebaseDynamicLinksSDK 제거,intent.data에서 직접 쿼리 파싱하는 방식으로 전환CourseDetailActivity.kt,MyDrawDetailActivity.ktrunnect-ios.web.app/share) 조립 방식으로 단순화AndroidManifest.xmlrnnt.page.link→runnect-ios.web.app/share로 변경,autoVerify="true"추가RunnectDynamicLink.kt→RunnectShareLink.ktlibs.versions.tomlfirebase-dynamic-links-ktx의존성 제거영향 범위
rnnt.page.link→runnect-ios.web.app/share)SchemeActivity) 전체 변경assetlinks.json은 iOS 레포(Firebase Hosting)에서 별도 배포 완료 (Runnect/Runnect-iOS#311)addOnFailureListener)가 사라짐Test Plan
./gradlew :app:compileDebugKotlin빌드 성공🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
runnect-ios.web.app/shareURL.Bug Fixes