'How to get system music queue from MusicKit?
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?
Solution 1:[1]
Apple has its own forums where developers can ask questions about MusicKit and get answers from Apple employees who are familiar with the framework.
I would recommend that you check the MusicKit section of the Apple Developer Forums, and post your question there.
I hope it helps.
Best regards,
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | JoeKun |