ApplicationMusicPlayer automatically turns Shuffle Mode On

Hi all,

I am playing songs via ApplicationMusicPlayer with MusicKit for Swift and I am running into an issue where shuffle mode is sometimes automatically turned on. Even though there was no code related to shuffle mode.

Here's a snippet

//myQueue is an array of Tracks
let player = ApplicationMusicPlayer.shared
player.queue = ApplicationMusicPlayer.Queue(for: myQueue)
// player.state.shuffleMode = .off 
// I tried explicitly setting shuffle mode off, which has no effect
try await player.play()

This issue is not easily reproducible, it occurs rarely and at random. But once this issue occurs it persists even after uninstalling and reinstalling the app. When I tried it to reproduce it with another device and everything works properly.

Anyone else running into this issue?

For Apple Engineers, here is the ticket: FB9816030

Answered by Frameworks Engineer in 703325022

Hello @ashinthetray,

We have included a fix for this issue in iOS 15.4 Beta 1.

I hope this helps.

Best regards,

Hello @ashinthetray,

Thank you very much for this question, and for filing FB9816030 on Feedback Assistant.

We have looked into this, and we believe this issue has the same underlying cause as the other issue described in this thread.

The master ticket we're using to track this issue is FB9703195.

We hope to be able to post an update in this thread in the near future with some good news.

Best regards,

Accepted Answer

Hello @ashinthetray,

We have included a fix for this issue in iOS 15.4 Beta 1.

I hope this helps.

Best regards,

ApplicationMusicPlayer automatically turns Shuffle Mode On
 
 
Q