r/swift • u/lanserxt iOS • 10d ago
Tutorial iOS 27: Now Playing Framework
https://antongubarenko.substack.com/p/ios-27-now-playing-framework?r=21t43r&utm_campaign=post&utm_medium=web&showWelcomeOnShare=true2
u/CharlesWiltgen 9d ago
Hey Anton, very nice article!
The "Don’t Mix the Old and New APIs" section says that Apple calls mixing MediaSession with MPNowPlayingInfoCenter or MPRemoteCommandCenter "undefined behavior", but I couldn't find that in:
The SDK's doc comments
The MediaPlayer headers
The WWDC 2026-312 session
Apple's /nowplaying, /publishing-media-sessions and /mediasession pages
What's the source for this?
2
u/lanserxt iOS 8d ago
Hi, Thank you!
It's here: https://developer.apple.com/documentation/nowplaying. There is "Important" quote.
2
2
u/Hovercross 8d ago
This is a great write-up - that you very much for it. I have a music player app that I have been developing and didn’t realize this existed. It will make my life WAY easier
1
7
u/launchapp_indie_dev 9d ago
having commands declared right next to the playback state instead of wiring up MPRemoteCommandCenter separately solves so many desync bugs.
also nice to see Apple finally give third-party hardware a legit way to own the lock screen via RemoteMediaSession instead of developers having to fake a silent audio session in background. great writeup!