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: 내 명함 위젯의 기본값 갱신 구현(#514) #519

Merged
merged 3 commits into from
May 12, 2023

Conversation

hyun99999
Copy link
Member

🌴 PR 요약

🌱 작업한 브랜치

🌱 작업한 내용

  • 내 명함 위젯의 기본값 갱신을 기존의 IntentHandler 에서 기본값을 설정하는 메서드를 사용하다가 변경
  • 이유: snapshot 을 받아오는 과정에서 정해진 기본값이 전달되는데 이게 갱신되지 않음 그래서 getsnapshot 메서드에서 서버통신하여 기본값을 설정하도록 변경

느낀 점

  • 첫 번째 방법은 IntentHandler 에서 서버통신을 통해 Intent 의 기본값을 설정하여서 Widget 의 getSnapshot(for:in:completion:) 에서 설정
    • IntentHandler 에서 default[Parameter Name](for:) 메서드를 사용하게되면 최초에 한번 호출되기 때문에 기본값을 정적으로 설정해줄 때 적합했습니다.
  • 두 번째 방법은 Widget 의 getSnapshot(for:in:completion:) 에서 서버통신을 통해 설정
    • 위젯을 추가하는 snapshot 을 얻기위한 단계를 매번 개입할 수 있기 때문에 매번 기본값에 대해서 확인해야할 경우에는 해당 방법이 적합했습니다.

📸 스크린샷

기능 스크린샷
GIF 파일첨부바람

📮 관련 이슈

- IntentHandler 에서 default[Parameter Name](for:) 메서드를 사용하게되면 최초에 한번 호출되기 때문에 기본값을 정적으로 설정해줄 때 적합했습니다.
- 위젯을 추가하는 snapshot 을 얻기위한 단계를 매번 개입할 수 있기 때문에 매번 기본값에 대해서 확인해야할 경우에는 해당 방법이 적합했습니다.
@hyun99999 hyun99999 added Hyungyu 🐯 현규 교수님 작업 Feat 새로운 기능 구현 labels May 11, 2023
@hyun99999 hyun99999 requested a review from dlwns33 May 11, 2023 08:57
@hyun99999 hyun99999 self-assigned this May 11, 2023
…ease into feature/TeamNADA#514

# Conflicts:
#	IntentsExtension/IntentHandler.swift
@hyun99999 hyun99999 merged commit e186716 into TeamNADA:develop May 12, 2023
@hyun99999 hyun99999 deleted the feature/#514 branch May 12, 2023 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feat 새로운 기능 구현 Hyungyu 🐯 현규 교수님 작업
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: 내 명함위젯의 기본값 갱신 구현
2 participants