-
Notifications
You must be signed in to change notification settings - Fork 2
[FEAT/#118] SharePhoto의 사진 앱 저장 기능 구현 및 리팩터링 #123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
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
- 사진 접근 권한 담당 요청 비즈니스 로직 구현
Closed
2 tasks
Closed
2 tasks
0Hooni
approved these changes
Nov 30, 2024
Collaborator
0Hooni
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
youn9k
approved these changes
Nov 30, 2024
Member
youn9k
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Kiyoung-Kim-57
approved these changes
Nov 30, 2024
Member
Kiyoung-Kim-57
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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.
🤔 배경
사진을 저장하거나 공유하는 기능을 구현하면서, 사진 라이브러리 접근 권한 요청 및 사진 저장 관련 로직이 필요했습니다.
이에 따라, 권한 요청과 사진 저장 기능을 관리하는 구조를 설계해야 했습니다.
다른 피쳐와 마찬가지로 권한 및 사진 저장 담당을 in/out 패턴으로 구현 및 리팩터링 했습니다.
📃 작업 내역
사진 접근 권한 관련
유틸리티 추가
PhotoLibraryPermissionManager와PhotoLibraryHelper를 구현했습니다.UI 구현
✅ 리뷰 노트
권한 관련
.notDetermined: 사진 접근 권한을 부여하지 않은 상태입니다.requestAuthorization()로 권한 요청을 진행합니다..authorized, .limited: 사진 접근 권한이 허용되거나 일부 제한된 상태로 권한이 충분하므로 사진 저장을 할 수 있습니다..denied, .restricted: 사용자가 명시적으로 접근을 거부하거나 / 시스템 정책에 따라 접근이 제한된 상태이므로 권한 설정을 유도하는 알러트를 두었습니다.비동기 로직 구현
async/await를 활용하여 비동기 처리를 단순화했습니다.escaping콜백 기반의 코드보다 가독성이 좋아 활용해보았습니다.🎨 스크린샷
.notDetermined.authorized,.limited.denied,.restricted🚀 테스트 방법
SharePhotoFeatureDemo를 실행하고 저장, 공유 버튼 기능을 테스트해볼 수 있습니다.