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

feat: 위젯 통해서 앱 열기 (#470) #492

Merged
merged 20 commits into from
May 8, 2023

Conversation

hyun99999
Copy link
Member

@hyun99999 hyun99999 commented May 6, 2023

🌴 PR 요약

🌱 작업한 브랜치

🌱 작업한 내용

  • qr 스캔 위젯
    • qr 를 스캔할 수 있는 화면이 등장합니다.
  • 내 명함 위젯
    • 내 명함을 바로 공유할 수 있는 바텀시트가 등장합니다.
  • 추가적으로 해당 브랜치에서 fix: 명함 뒷면 배경 이미지 넣기 #487 도 진행하였습니다.

🚨 참고사항

IntentHandler 의 defaultMyCard 메서드가 이제 위젯을 추가할때 호출되는데 이때 서버통신을 통해서 대표명함을 찾고, 이를 기본값으로 설정해주도록 구현하려고 했습니다.
즉, 서버통신을 통해서 결과데이터를 가져오면 그때 리턴하려고했는데 completion handler 내부에서 return 할 수 없기 때문에 고민입니다.. 방법이 있을까요?

📸 스크린샷

기능 스크린샷
내 명함 위젯
위젯에서 앱 열기

📮 관련 이슈

@hyun99999 hyun99999 added Hyungyu 🐯 현규 교수님 작업 🚨review required🚨 긴급긴급 빠르게 확인해야할 사항 Feat 새로운 기능 구현 labels May 6, 2023
@hyun99999 hyun99999 requested a review from dlwns33 May 6, 2023 12:34
@hyun99999 hyun99999 self-assigned this May 6, 2023
Comment on lines 54 to 58
if let result {
self?.cardItems = result.data
myCard = MyCard(identifier: self?.cardItems?[0].cardUUID ?? "", display: self?.cardItems?[0].cardName ?? "")
myCard?.userName = self?.cardItems?[0].userName
myCard?.cardImage = self?.cardItems?[0].cardImage
Copy link
Member

Choose a reason for hiding this comment

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

교수님! 참고사항에 적힌 내용이 여기에서 return을 하려고 했는데 못한다는 얘기일까요?

Copy link
Member Author

Choose a reason for hiding this comment

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

그쳐.. 서버통신이 비동기라서 리턴이랑은 별개로 알아서 되는거라 nil 값이 리턴됩디다

Copy link
Member Author

Choose a reason for hiding this comment

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

@dlwns33
dispatch group 으로 해결했심더!

  • 서버통신의 결과를 동기적으로 사용하기 위해서 DispatchGroup 을 사용.
  • 비동기 통신이기 때문에 group 의 enter,leave 사용.
  • 60초까지만 기다리기로 함.

Copy link
Member Author

Choose a reason for hiding this comment

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

  • 액세스 토큰인 있는 경우에 위젯의 기본값 설정
Simulator.Screen.Recording.-.iPhone.14.Pro.Max.-.2023-05-08.at.14.25.39.mov

Copy link
Member Author

Choose a reason for hiding this comment

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

  • 액세스 토큰이 있는 경우에 위젯의 기본값 설정
Simulator.Screen.Recording.-.iPhone.14.Pro.Max.-.2023-05-08.at.14.38.15.mp4

Copy link
Member Author

Choose a reason for hiding this comment

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

  • 액세스 토큰이 없어서 명함을 선택할 수 없는 경우
Simulator.Screen.Recording.-.iPhone.14.Pro.Max.-.2023-05-08.at.14.42.05.mov

- 서버통신의 결과를 동기적으로 사용하기 위해서 DispatchGroup 을 사용.
- 비동기 통신이기 때문에 group 의 enter,leave 사용.
- 60초까지만 기다리기로 함.
@hyun99999 hyun99999 merged commit 4f784ef into TeamNADA:develop May 8, 2023
@hyun99999 hyun99999 deleted the feature/#470 branch May 8, 2023 06:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feat 새로운 기능 구현 Hyungyu 🐯 현규 교수님 작업 🚨review required🚨 긴급긴급 빠르게 확인해야할 사항
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fix: 온보딩, 액세스 토큰 UserDefaults key 변경 feat: 위젯 통해서 앱열기
2 participants