-
Notifications
You must be signed in to change notification settings - Fork 1
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
[#94] 사용자의 애플 뮤직 구독 관리 #104
Conversation
- 사용자의 애플 뮤직 구독 상태를 관리하는 manager 생성 - 구독하지 않은 사용자의 경우, - 온보딩 이후 or 홈 화면 진입 시에 애플에서 제공하는 구독 권유 sheet가 뜬다.
import MusicKit | ||
import SwiftUI | ||
|
||
class SubscriptionManager: ObservableObject { |
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.
final 키워드를 안 붙이신 이유가 있을까요?
class SubscriptionManager: ObservableObject { | ||
static let shared = SubscriptionManager() | ||
|
||
@State var musicSubscription: MusicSubscription? |
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.
State 변수로 선언하신 이유가 있을까요?
@@ -14,8 +14,10 @@ struct HomeView: View { | |||
@StateObject private var musicPersonalRecommendationModel = MusicPersonalRecommendationModel() | |||
// 지난 선곡 데이터를 위한 모델 | |||
@StateObject private var selectedMusicDataModel = TrackIDConverter() | |||
@ObservedObject var subscriptionManager = SubscriptionManager.shared |
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.
@ StateObject로 선언하는 건 어떨까요?
} | ||
.task { |
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.
SubscriptionManager에서 메서드로 작성한 기능과 같은 거 같은데 없어도 되는 거 같은데..
맞나용? 🐯
- 사용자의 애플 뮤직 구독 상태 관리
- 현재 다크모드 배경 문제로 라이트모드만 사용 가능하도록 설정
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.
수고링고링링
📝 작업 내용
스크린샷
💬 리뷰 요구사항(선택)