Returns the system music player, which controls the Music app’s state.
SDKs
- iOS 8.0+
- Mac Catalyst 13.0+
Framework
- Media Player
Declaration
@property(class, readonly) MPMusic Player Controller<MPSystem Music Player Controller> *systemMusicPlayer;
Return Value
The system music player.
Discussion
The System music player employs the Music app on your behalf. On instantiation, it takes on the current Music app state and controls that state as your app runs. Specifically, the shared state includes the following:
Repeat mode (see
MPMusic
)Repeat Mode Shuffle mode (see
MPMusic
)Shuffle Mode Now-playing item (see
now
)Playing Item Playback state (see
playback
)State
Other aspects of the Music app’s state are not shared. Music that is playing continues to play when your app moves to the background.