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: 위젯 추가 (#364) #367

Merged
merged 19 commits into from
Feb 17, 2023
Merged

Conversation

hyun99999
Copy link
Member

@hyun99999 hyun99999 commented Feb 7, 2023

🌴 PR 요약

🌱 작업한 브랜치

🌱 작업한 내용

  • 잠금 화면 위젯 추가
    • 앱을 여는 OpenAppLockScreenWidget.
    • QRCode 인식 뷰를 여는 QRCodeWidget.
  • 홈 위젯 추가
  • Configurable widget 에서 사용할 intent definition file 을 추가.
    • cardID 로 구분하여 선택목록을 구성하 것이기 때문에 intent 의 MyCard 타입의 cardID property 생성.

🚨 참고 사항

  • 트러블 슈팅 1 - 빌드 시에 다음과 같은 에러가 발생.

pr1- intent 를 타겟에 추가하지 않으면 이럼

intent definition file 을 통해 intent 를 생성하고 타겟에서 사용하지 않아서 생기는 에러였습니다.
다음과 같이 추가해서 해결하였습니당

스크린샷 2023-02-07 오후 3 36 17

스크린샷 2023-02-07 오후 3 36 24

  • 트러블 슈팅 2 - multiple commands produce "/User/..../Card.o" 에러
    custom intent 의 타입으로 선언한 Card 가 중복된 이유였기 때문에(color asset 과 중복) 이를 MyCard 로 수정하였습니다.

📸 스크린샷

기능 스크린샷
잠금화면 위젯
홈 위젯

📮 관련 이슈

- Color 를 확장하여서 위젯의 다크모드를 대응.
- WidgetsBundle 관련 파일 이동.
- Intent Definition File 에서 사용할 custom intent  를 타겟에 추가
- Configurable Widget 에서도 동적인 선택 목록을 설정할 수 있도록 dynamic options 설정.
- MyCard 타입을 생성하여 파라미터로 설정.
- MyCard 타입에서 cardID 로 선택목록을 구분하기 위해서 property 로 설정.
- custom intent 의 타입으로 선언했던 Card 가 중복된 이름으로 여겨져서 "multiple commands produce" 에러가 생겨서 MyCard 로 변경.
- 기존의 ConfigurationIntent 를 MyCardIntent 로 변경.
- 선택목록을 제공하지 않기 때문에 StaticConfiguration 사용.
- image 로 UI 구현.
- 위젯 선택시 동작이 예정되어 있기 때문에 widgetURL 사용.
- QRCodeWidget 을 설명하는 내용 작성.
- accessoryCircular 를 추가하여 잠금화면 위젯 구현.
- 잠금화면 위젯으로만 사용하기 때문에 accessoryCircular 만 설정.
- 선택목록을 제공하지 않기 때문에 StaticConfiguration 사용.
- 잠금화면 위젯이기 때문에 accessoryCircular 만 구현.
- OpenAppLockScreenWidget 설명 작성.
@hyun99999 hyun99999 added Hyungyu 🐯 현규 교수님 작업 Feat 새로운 기능 구현 labels Feb 7, 2023
@hyun99999 hyun99999 self-assigned this Feb 7, 2023
@hyun99999
Copy link
Member Author

트러블 슈팅도 추가해두었습니당~

Copy link
Member

@dlwns33 dlwns33 left a comment

Choose a reason for hiding this comment

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

선생님 감사합니다, 위젯에 대해 아는것이 많이 없어 이렇게 밖에 코리를 못하지만서도, 집도의 데뷔를 축하드립니다,

Comment on lines +8 to +9
import WidgetKit
import SwiftUI
Copy link
Member

Choose a reason for hiding this comment

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

이것부터 간지가 납니다.

case .accessoryCircular:
ZStack {
AccessoryWidgetBackground()
Image("widgetQrLockscreenWhite")
Copy link
Member

Choose a reason for hiding this comment

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

저희 스보 사용하지 않으면 SwiftGen 한번 사용해서 오타 방지용으로 이미지 한번 constant로 만들어 놓을까요?!

Copy link
Member Author

Choose a reason for hiding this comment

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

오호.. 좋습니다..!

@hyun99999 hyun99999 merged commit 3ed4699 into TeamNADA:develop Feb 17, 2023
@hyun99999 hyun99999 deleted the feature/#364 branch February 17, 2023 10:41
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