I'm using MusicKit to build an iOS app that manages the queue of Apple Music. I am able to get the current item in the queue by:
SystemMusicPlayer.shared.queue.currentEntry
And I can subscribe to changes in the queue with:
cancellable = SystemMusicPlayer.shared.queue.objectWillChange.sink(receiveValue: { _ in
print("Received value: \(SystemMusicPlayer.shared.queue.currentEntry)")
})
However, I'm unable to figure out how I can get the upcoming items in the queue. Does anyone know how to do this with the new MusicKit API?