This class displays song information, such as the title, the author, and the album cover, on the lock screen and in the multitasking bar.
Questions tagged [mpnowplayinginfocenter]
146 questions
11
votes
4 answers
How to tell the MPNowPlayingInfoCenter wether or not the music is playing or paused?
I can't seem to make iOS show the correct play / pause button in the remote audio controls. I do receive the remote control events and set all values of the nowPlayingInfo dictionary.
Everything works fine and I even see a cover photo on the lock…

openfrog
- 40,201
- 65
- 225
- 373
11
votes
3 answers
Reading MP3 information using objective c
I have mp3 files stored on the iPhone and I my application should to be able to read the ID3 information, i.e length in seconds, artist, etc.
Does anyone know how to do this or what library to use in Objective-C?
Your thoughts are much appreciated.

TonyNeallon
- 6,607
- 12
- 42
- 49
9
votes
1 answer
How to set an title of the currently playing audio in iPhone lock screen?
When you play a music, the music title is shown below the time in the lock screen.
I have also seen how TuneIn radio does that by showing the name of the currently playing radio station.
How do you do that?

samwize
- 25,675
- 15
- 141
- 186
9
votes
1 answer
Difference between AVAudioPlayer AVPlayer AVQueuePlayer MPMusicPlayerController MPRemoteCommandCenter MPNowPlayingInfoCenter for an iOS 13+ app
All of the threads on this topic are really old (5+ yo), and I can't seem to form a clear MODERN approach, so hopefully this can be summarized for 2020 (Swift 5, Xcode 11).
If you were to build an AUDIO (not just music) player app for the iPhone…

Rogi I.
- 127
- 1
- 8
9
votes
2 answers
MPNowPlayingInfoCenter always in playing state
I have my MPNowPlayingInfoCenter up and running but one problem remains.
regardless of my actual player state the MPNowPlayingInfoCenter is always "playing" and displays the pause button. When pressed it fires the pause event.
When my player changes…

Maximilian Körner
- 846
- 11
- 31
9
votes
1 answer
MPMediaItemArtwork and transparency
While trying to obtain a transparent cover image on iPhone lock screen I got white background where it should be transparent.
Is it possible to use image with alpha channel for MPMediaItemArtwork at all? I found nothing about it in the official…

san
- 443
- 5
- 12
8
votes
5 answers
Unable to set AudioSession inactive with AVPlayer
I am using an AVPlayer to playback audio in my iOS app (because the audio files I'm playing are not local), and when my track finishes, I want to hide the InfoCenter controls, but I get this error:
AVAudioSession.mm:1079:-[AVAudioSession…

enyo
- 16,269
- 9
- 56
- 73
8
votes
2 answers
MPNowPlayingInfoCenter stopped updating the progress bar
I am making an app that has a music player in it. I haven't worked on it in a while but the last time I worked on it the nowPlayingInfo
was working. Now, when I updated it to Swift 3, everything works except for the progress bar.
I have seen a few…

lagoon
- 6,417
- 6
- 23
- 30
7
votes
2 answers
iOS media playback controls notification
I am new to iOS, and developing a cross platform app with Flutter. I am trying to play audio from network URL, which i found it can be done using the AVPlayer. The audio plays when the app is in foreground and in background, but i can display the…

medyas
- 1,166
- 13
- 21
7
votes
0 answers
Apple Music conflicting with MPNowPlayingInfoCenter
I need some help with an issue when my music player app is playing on background.
I'm able to play the musics in the app and in the background with both services. I'm also able to set the MPNowPlayingInfoCenter and it displays the correct info, but…

Marcelo Gracietti
- 3,121
- 1
- 16
- 24
7
votes
2 answers
Update MPRemoteCommandCenter play/pause button
I have an iOS 9 app that plays MIDI-like songs using an AudioGraph. I've set up remote control commands with MPRemoteCommandCenter and info with MPNowPlayingInfoCenter such that the currently playing song shows up in Control Center and responds to…

Jayson
- 1,689
- 14
- 26
7
votes
1 answer
Get current track playing on control center iOS
I'm looking to get the current track playing on iOS whatever the app which is playing the track. I mean, for example, if I use SoundCloud or Spotify on my phone, the player on control center is the same, so I think it's possible to get the current…

testoverblaireau
- 179
- 5
- 19
7
votes
1 answer
AVAudioPlayer on Lock Screen
I've implemented an audio player using AVAudioPlayer (not AVPlayer). I'm able to handle the remote control events with the following method. It works quite alright so far, however I see two more subtypes for these events:…

Neeku
- 3,646
- 8
- 33
- 43
7
votes
3 answers
Is MPNowPlayingInfoCenter compatible with AVAudioPlayer?
I start -play with AVAudioPlayer, and then set the nowPlaying dictionary like this:
NSMutableDictionary *songInfo = [[NSMutableDictionary alloc] init];
MPMediaItemArtwork *albumArt = [[MPMediaItemArtwork alloc] initWithImage: [UIImage…

openfrog
- 40,201
- 65
- 225
- 373
6
votes
2 answers
How to remove my app from Now Playing Info?
My app start playing music and it appears in Now Playing Info, but i can't find how to clean it all: destroy the player and remove my app from Now Playing Info.
The lib that i'm using have not implemented this and i know almost nothing about…

David Rearte
- 764
- 8
- 19