View in English

  • Apple Developer
    • 시작하기

    시작하기 탐색

    • 개요
    • 알아보기
    • Apple Developer Program

    알림 받기

    • 최신 뉴스
    • Hello Developer
    • 플랫폼

    플랫폼 탐색

    • Apple 플랫폼
    • iOS
    • iPadOS
    • macOS
    • tvOS
    • visionOS
    • watchOS
    • App Store

    피처링

    • 디자인
    • 배포
    • 게임
    • 액세서리
    • 웹
    • 홈
    • CarPlay
    • 기술

    기술 탐색

    • 개요
    • Xcode
    • Swift
    • SwiftUI

    피처링

    • 손쉬운 사용
    • 앱 인텐트
    • Apple Intelligence
    • 게임
    • 머신 러닝 및 AI
    • 보안
    • Xcode Cloud
    • 커뮤니티

    커뮤니티 탐색

    • 개요
    • Apple과의 만남 이벤트
    • 커뮤니티 주도 이벤트
    • 개발자 포럼
    • 오픈 소스

    피처링

    • WWDC
    • Swift Student Challenge
    • 개발자 이야기
    • App Store 어워드
    • Apple 디자인 어워드
    • 문서

    문서 탐색

    • 문서 라이브러리
    • 기술 개요
    • 샘플 코드
    • 휴먼 인터페이스 가이드라인
    • 비디오

    릴리즈 노트

    • 피처링 업데이트
    • iOS
    • iPadOS
    • macOS
    • watchOS
    • visionOS
    • tvOS
    • Xcode
    • 다운로드

    다운로드 탐색

    • 모든 다운로드
    • 운영 체제
    • 애플리케이션
    • 디자인 리소스

    피처링

    • Xcode
    • TestFlight
    • 서체
    • SF Symbols
    • Icon Composer
    • 지원

    지원 탐색

    • 개요
    • 도움말
    • 개발자 포럼
    • 피드백 지원
    • 문의하기

    피처링

    • 계정 도움말
    • 앱 심사 지침
    • App Store Connect 도움말
    • 새로 추가될 요구 사항
    • 계약 및 지침
    • 시스템 상태
  • 빠른 링크

    • 이벤트
    • 뉴스
    • 포럼
    • 샘플 코드
    • 비디오
 

비디오

메뉴 열기 메뉴 닫기
  • 컬렉션
  • 전체 비디오
  • 소개

더 많은 비디오

  • 소개
  • 요약
  • 코드
  • 앱에 MusicKit 통합하기

    MusicKit을 사용하여 Apple Music의 강력한 기능을 앱에 도입해 보세요. 승인, 구독 상태 확인, 음악 선택, 재생 제어, 스토어프론트 간 곡 공유를 다룹니다. 새로운 음악 선택기를 사용하여 사용자가 Apple Music 카탈로그와 개인 보관함을 살펴볼 수 있도록 하는 방법을 알아보세요. 또한 SystemMusicPlayer와 ApplicationMusicPlayer의 차이점을 자세히 살펴보고, 재생 상태를 관찰하는 방법을 안내합니다.

    챕터

    • 0:00 - Introduction
    • 2:11 - Project setup and authorization
    • 7:10 - Music items and music picker
    • 10:54 - Music players and playback
    • 16:26 - Catalog requests
    • 20:11 - Next steps

    리소스

    • Integrating MusicKit into your app
    • Apple Services Performance Partner Program
    • MusicKit
      • HD 비디오
      • SD 비디오

    관련 비디오

    WWDC23

    • SwiftUI의 Observation 알아보기

    WWDC22

    • Apple Music API 및 MusicKit 소개
    • MusicKit으로 더 많은 콘텐츠 살펴보기
  • 비디오 검색…
    • 4:47 - Presents the Apple Music subscription offer

      @State var showSubscriptionOffer = false
      
      let options = MusicSubscriptionOffer.Options(
          messageIdentifier: .playMusic
      )
      
      @ViewBuilder
      var musicSubsriptionButton: some View {
          Button("Subscribe to Apple Music", systemImage: "music.note") {
              showSubscriptionOffer = true
          }
          .musicSubscriptionOffer(isPresented: $showSubscriptionOffer, options: options)
      }
    • 5:59 - Adds subscription button to main view

      @State var subscription: MusicSubscription?
      
      var body: some View {
        	VStack {
              // ...
              if let subscription, subscription.canBecomeSubscriber {
                  musicSubscriptionButton
              }
          }
          .task(id: isAuthorized) {
      	      self.subscription = try? await MusicSubscription.current
              for await subscription in MusicSubscription.subscriptionUpdates {
                  self.subscription = subscription
              }
          }
      }
    • 8:48 - Add .musicPicker() modifier

      @State var showMusicPicker = false
      @State var selectedSong: Song? = nil
      
      @ViewBuilder
      var musicPickerButton: some View {
          Button("Pick some Music", systemImage: "music.note.list") {
              showMusicPicker = true
          }
          .musicPicker(isPresented: $showMusicPicker, selection: $selectedSong)
      }
      
      var body: some View {
          VStack {
              if let subscription, subscription.canBecomeSubscriber {
                  musicSubscriptionButton
              }
              musicPickerButton
          }
      }
    • 14:49 - Artwork

      @State var queue = ApplicationMusicPlayer.shared.queue
      
      var body: some View {
          VStack {
              if let artwork = queue.currentEntry?.artwork {
                  ArtworkImage(artwork, width: 200, height: 200)
              } else {
                  // Placeholder artwork
                  RoundedRectangle(cornerRadius: 16)
                      .fill(.quaternary)
                      .frame(width: 200, height: 200)
              }
          }
      }
    • 15:06 - Current entry info

      @State var queue = ApplicationMusicPlayer.shared.queue
      
      var body: some View {
          VStack {
              // ...
              if let currentSong = queue.currentEntry {
                  Text(currentSong.title)
                      .font(.title3.bold())
                    
                  if let subtitle = currentSong.subtitle {
                      Text(subtitle)
                          .font(.subheadline)
                          .foregroundStyle(.secondary)
                  }
              }
          }
      }
    • 15:14 - Playback controls (play, pause)

      let player = ApplicationMusicPlayer.shared
      @State var state = ApplicationMusicPlayer.shared.state
      
      var isPlaying: Bool {
          state.playbackStatus == .playing
      }
      
      var playPause: some View {
          Button (
              isPlaying ? "Pause": "Play",
              systemImage: isplaying ? "pause.fill" : "play.fill"
          ) {
              if isPlaying {
                  player.pause()
              } else {
                  Task {
                      try await player.play()
                  }
              }
          }
      }
    • 15:38 - Playback controls (next, previous)

      let player = ApplicationMusicPlayer.shared
      
      var controls: some View {
          HStack {
              Button("Back", systemImage: "backward.fill") {
                  Task {
                      try await player.skipToPreviousEntry()
                  }
              }
              // ...
              Button("Next", systemImage: "forward.fill") {
                  Task {
                      try await player.skipToNextEntry()
                  }
              }
          }
      }
    • 18:58 - Music catalog resource request

      func fetchSongs(songIDs: [MusicItemID]) async throws -> (featured: Song?, other: [Song]) {
          var request = MusicCatalogResourceRequest‹Song>(matching: \.id, memberOf: songIDs)
          request.options = [.findEquivalents]
          
          let response = try await request.response()
          
          let featuredSongID = songIDs[0]
          let featuredSong = response.item(for: featuredSongID)
          
          let others: [Song] = songIDs[1...].compactMap { songID in
              return response.item(for: songID)
          }
          
          return (featuredSong, others)
      }
    • 0:00 - Introduction
    • An introduction to MusicKit and an overview of how to build a music-enhanced workout app using Swift concurrency and SwiftUI.

    • 2:11 - Project setup and authorization
    • Learn how to configure your Xcode project with the necessary capabilities, request music library authorization, and present Apple Music subscription offers to users.

    • 7:10 - Music items and music picker
    • Explore the properties and relationships of MusicKit music items, and use the music picker view modifier to let users browse and select songs from the Apple Music catalog or their own library.

    • 10:54 - Music players and playback
    • Dive into using SystemMusicPlayer and ApplicationMusicPlayer. Discover how to set up playback queues, observe playback state, and build UI controls for playback in SwiftUI.

    • 16:26 - Catalog requests
    • Use structured catalog requests like MusicCatalogResourceRequest to fetch curated Apple Music content, and learn how to handle localization and content equivalency.

    • 20:11 - Next steps
    • A quick recap of MusicKit capabilities and pointers to related sessions for further learning.

Developer Footer

  • 비디오
  • WWDC26
  • 앱에 MusicKit 통합하기
  • 메뉴 열기 메뉴 닫기
    • iOS
    • iPadOS
    • macOS
    • tvOS
    • visionOS
    • watchOS
    메뉴 열기 메뉴 닫기
    • Swift
    • SwiftUI
    • Swift Playground
    • TestFlight
    • Xcode
    • Xcode Cloud
    • SF Symbols
    메뉴 열기 메뉴 닫기
    • 손쉬운 사용
    • 액세서리
    • Apple Intelligence
    • 앱 확장 프로그램
    • App Store
    • 오디오 및 비디오(영문)
    • 증강 현실
    • 디자인
    • 배포
    • 교육
    • 서체(영문)
    • 게임
    • 건강 및 피트니스
    • 앱 내 구입
    • 현지화
    • 지도 및 위치
    • 머신 러닝 및 AI
    • 오픈 소스(영문)
    • 보안
    • Safari 및 웹(영문)
    메뉴 열기 메뉴 닫기
    • 문서(영문)
    • 튜토리얼
    • 다운로드
    • 포럼(영문)
    • 비디오
    메뉴 열기 메뉴 닫기
    • 지원 문서
    • 문의하기
    • 버그 보고
    • 시스템 상태(영문)
    메뉴 열기 메뉴 닫기
    • Apple Developer
    • App Store Connect
    • 인증서, 식별자 및 프로파일(영문)
    • 피드백 지원
    메뉴 열기 메뉴 닫기
    • Apple Developer Program
    • Apple Developer Enterprise Program
    • App Store Small Business Program
    • MFi Program(영문)
    • Mini Apps Partner Program
    • News Partner Program(영문)
    • Video Partner Program(영문)
    • Security Bounty Program(영문)
    • Security Research Device Program(영문)
    메뉴 열기 메뉴 닫기
    • Apple과의 만남
    • Apple Developer Center
    • App Store 어워드(영문)
    • Apple 디자인 어워드
    • Apple Developer Academy(영문)
    • WWDC
    최신 뉴스 읽기.
    Apple Developer 앱 받기.
    Copyright © 2026 Apple Inc. 모든 권리 보유.
    약관 개인정보 처리방침 계약 및 지침