Music Picker
Presents a music picker to select items from the Apple Music catalog and the user’s music library.
Platform Compatibility
Tags
SwiftUI Code
import MusicKit
@State var showMusicPicker = true
@State var selectedSongs: MusicItemCollection<Song> = []
var body: some View {
Text("Foo")
.musicPicker(
isPresented: $showMusicPicker,
title: Text("Bar"),
selection: $selectedSongs
)
}