fix: 커스텀 사운드 키링 영상 생성 실패 버그 수정#61
Merged
Hidden character warning
The head ref may contain hidden characters: "bugfix/-\ud0a4\ub9c1-\ub9cc\ub4e4\uae30---\ucee4\uc2a4\ud140-\uc0ac\uc6b4\ub4dc-\uc0ac\uc6a9-\ud0a4\ub9c1\uc601\uc0c1-\ubbf8\uc0dd\uc131-\ubc84\uadf8"
Merged
Conversation
3개 파일에서 동일한 로직이 중복되어 추상화했음. - URL 형식 .../o/path%2Fto%2Ffile.m4a?token=... ~~ 에서 file.m4a 추출 - URL 인코딩된 경로 디코딩 처리
새로 생성된 키링의 커스텀 사운드가 캐시에 없어 영상 생성 실패!~ 였으나 수정 - Firebase 업로드 후에, viewModel.soundId를 Firebase URL로 업뎃 - copySoundToCache: 로컬 파일을 캐시에 복사 -> 영상 생성 시 사용 - extractFileName 중복 제거 -> String 익스텐션에서 사용
Firebase URL path에서 잘못된 파일명을 추출하던 버그 수정 - 기존: downloadURL.path.last → URL 인코딩된 전체 경로 반환 - 수정: firebaseStorageFileName → /o/ 이후 경로를 디코딩하여 실제 파일명 추출 - 불필요한 디버그 로그 제거
- findSoundURL 함수 간결화
Member
|
빨리 업데이트 해조 |
jini-coding
approved these changes
Feb 9, 2026
| } | ||
|
|
||
|
|
||
| // MARK: - 로컬 사운드 파일을 캐시에 복사 |
Member
There was a problem hiding this comment.
결국 이 사운드 파일도 캐시에 있어야 했네요... 그래도 명확한 해결방안이네요!
이전에 선물 주고 받는 것도 녹음 파일이 문제였는데 이래저래 손이 많이 가는 녀석...
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.
🎯 PR 내용
커스텀 사운드를 사용한 키링에서 영상 공유 시, 영상 생성이 실패하는 버그를 수정했씁니다.
원인 분석
1. Firebase Storage URL 파일명 추출 오류
Firebase Storage URL 구조는 이렇습니다.
기존 코드 (EffectSyncManager.swift):
문제점
KeyringVideoGenerator도 동일한 문제:
2. 새로 생성된 키링의 사운드가 캐시에 없음
키링 생성 플로우는 아래와 같습니다.
문제점
3. viewModel.soundId가 업데이트되지 않음
기존 코드
결론적으로,
아래 플로우대로 수정이 되어야 합니다.
해결!
1. Firebase Storage URL 파일명 추출 로직 수정 (+공용화)
String+Extension.swift파일명 추출 동작
2. 새로 생성된 키링의 사운드를 캐시에 복사
결론
키링 씬에서 사운드가 정상 재생되더라도,
영상 생성 시에는 동일한 사운드 파일이 로컬 캐시에 존재해야 합니다.
새로 생성된 키링의 커스텀 사운드를 즉시 캐시에 복사하여, 완성뷰에서 바로 영상 공유가 가능하도록 한 것,.
📱 스크린샷 (UI 변경 시)
🔗 관련 이슈
✅ 체크리스트