Skip to content
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

카카오톡 공유, URL 공유 기능 구현 #107

Merged
merged 39 commits into from
Aug 26, 2024

Conversation

ShapeKim98
Copy link
Contributor

#️⃣연관된 이슈

#78

📝작업 내용

이번 PR에서 작업한 내용을 간략히 설명해주세요(이미지 첨부 가능)

  • KakaoSDK 의존성 설치
  • 카카오 sdk 네이티브 키 등록
  • KakaoShareClient작성
  • 포킷 카카오톡 공유하기 기능 구현
  • 카카오톡으로 공유된 URL Scheme에 따른 공유 플로우 핸들링
  • @stealmh 공유된 포킷의 예외 처리를 위한 BaseError 작성
  • 컨텐츠의 url 공유 기능 구현

스크린샷 (선택)

ScreenRecording_08-26-2024.01-25-21_1.MOV
ScreenRecording_08-26-2024.2.MOV
ScreenRecording_08-26-2024.01-26-10_1.MP4

💬리뷰 요구사항(선택)

리뷰어가 특별히 봐주었으면 하는 부분이 있다면 작성해주세요

ex) 메서드 XXX의 이름을 더 잘 짓고 싶은데 혹시 좋은 명칭이 있을까요?

  • 어제 해커톤 스프린트를 진행하면서 기존 공유하기 플로우가 많이 바꼈습니다.(피그마에 있는거랑 다름)
  • 오류 코드 관련으로 서버와 의논하여 카테고리에 대한 오류는 CA_XXX로 바꾸기로 결정하였고, 작성해주신 BaseError에 반영하였습니다.
  • 공유하기 플로우가 바뀌면서, 카테고리 수정/저장에 중복된 포킷 이름 예외처리 핸들링을 추가하였습니다.
  • CategoryDetailView와 공유된 카테고리 미리보기 화면이 유사하여, FeatureCategoryDetail에서 공유하기 기능을 추가하는 방식으로 가려고 했으나, 도메인의 차이도 크고, 자칫 CategoryDetailFeature가 너무 비대해질 것 같아 FeatureSharing이라는 기능 모듈로 빼서 구현을 하였습니다.
  • 컨텐츠의 url 공유기능은 SwiftUIShareLink를 쓰려고 했으나, 공유 완료 시점의 sheet 핸들링이 필요하여, UIKitUIActivityViewController를 사용하여 별도의 공유 시트와 completion을 사용하는 방향으로 구현하였습니다.

close #78

@ShapeKim98 ShapeKim98 added the Feat 기능구현 label Aug 25, 2024
@ShapeKim98 ShapeKim98 self-assigned this Aug 25, 2024
Comment on lines +46 to +49
case let .공유받은_카테고리_조회(categoryId, _):
return "/share/\(categoryId)"
case .공유받은_카테고리_저장:
return "/share"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Util Constants보고 수정

Comment on lines 226 to 232
case let .포킷_오류_핸들링(baseError):
switch baseError {
case let .CA_001(message):
state.pokitNameTextInpuState = .error(message: message)
return .none
default: return .none
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

저는 이 과정이 필요없다고 생각함
곧바로 state.pokitNameTextInputState = .error(message: baseError.message) 하지 않고 케이스처리한 이유가???

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

생각해보니 그러네여 왜 그랬지..

Copy link
Member

@stealmh stealmh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생많으셨습니다! 궁금한거나 이상한거 코맨트 달아놨읍니다.

  1. 모델 객체만들 때 init많이 사용하시는 것으로 보이는데 이러면 사용되는 모델이 어떤 이름을 가진 객체를 init하는지 알 수 없어서 저는 직관적이지 않다고 생각합니다.
    let request = Model(dosomething: )
    형식으로 통일해주시면 좋을 것 같아요

2.sheet의 핸들링이 필요하여 ShareLink를 사용하지 못함
이부분에 대해 명확한 근거가 필요할 것 같아요.
구현하지 못한 것인지 못하는 상황인지 알수있게 공식문서를 참고해서 말씀해주시면 좋을 것 같습니다.

@ShapeKim98
Copy link
Contributor Author

고생많으셨습니다! 궁금한거나 이상한거 코맨트 달아놨읍니다.

  1. 모델 객체만들 때 init많이 사용하시는 것으로 보이는데 이러면 사용되는 모델이 어떤 이름을 가진 객체를 init하는지 알 수 없어서 저는 직관적이지 않다고 생각합니다.
    let request = Model(dosomething: )
    형식으로 통일해주시면 좋을 것 같아요

2.sheet의 핸들링이 필요하여 ShareLink를 사용하지 못함 이부분에 대해 명확한 근거가 필요할 것 같아요. 구현하지 못한 것인지 못하는 상황인지 알수있게 공식문서를 참고해서 말씀해주시면 좋을 것 같습니다.

  1. 넵 바꾸겠습니다!
  2. 처음에 ShareLink로 구현을 했었는데, 공유를 완료하고 나니 PokitBottomSheet가 안닫히거나 간헐적으로 다시 나타나는 버그가 발생했습니다... 그래서 아예 공유 시트를 우리가 다룰 수 있도록, UIKit으로 대체 하였고, 그러면서 ios 공유 시트에 대한 트리거를 우리가 관리 하다보니, 공유가 완료된 시점의 completion이 필요하였고(공유가 완료되면 공유시트를 닫아야 하기 때문) 별도의 공유 완료 시점의 핸들링을 구현한 것 입니다. 결론적으로 못하는 상황이 맞을것 같아요.

@ShapeKim98 ShapeKim98 force-pushed the feature/#78-kakaotalk-share branch from 434e8ca to b26fa40 Compare August 26, 2024 15:27
@ShapeKim98 ShapeKim98 merged commit 8336026 into develop Aug 26, 2024
1 check passed
@stealmh stealmh deleted the feature/#78-kakaotalk-share branch September 3, 2024 12:26
@stealmh stealmh linked an issue Oct 2, 2024 that may be closed by this pull request
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feat 기능구현
Projects
None yet
Development

Successfully merging this pull request may close these issues.

링크 공유 기능 구현
2 participants