Hi,
I’m testing the new NowPlaying framework on iOS 27 using Xcode 27 and an iPhone 17 Simulator, and I’m seeing some behavior that I’m trying to determine is a Simulator issue or something incorrect in my implementation.
I have a local AVPlayer playing an MP3 and a MediaSession conforming to MediaSessionRepresentable. The session publishes MusicContent with static artwork, AnimatedArtwork using the .tall aspect ratio, a MediaPlaybackSnapshot, and commands for play, pause, previous, next, and seek.
The strange behavior is:
I start playback and call requestToBecomeApplicationPrimary(). It succeeds and isApplicationPrimary becomes true, but isSystemPrimary remains false.
I lock the Simulator for the first time. There is no Now Playing UI or metadata.
I unlock it and return to the app.
After recreating/re-registering the MediaSession and calling requestToBecomeApplicationPrimary() again, isSystemPrimary sometimes becomes true.
When I lock the Simulator a second time, the Now Playing UI finally appears and the animated 3:4 artwork works correctly.
However, the Lock Screen card still does not show the expected play/pause/previous/next buttons. It only shows the title, artist, progress bar, and volume control, despite those commands being included in commands.
When the second session succeeds, the framework also starts requesting the artwork as expected:
applicationPrimary: true
systemPrimary: true
Animated preview requested: (1206, 1608) ratio: tall
Static artwork requested
Animated video requested: (1206, 1608) ratio: tall
Calling requestToBecomeSystemPrimary() directly has also consistently returned:
internalFailure
Playback itself continues correctly throughout all of this.
So I’m trying to understand whether anyone else is seeing similar behavior with the iOS 27 Simulator:
MediaSession becoming application-primary but not system-primary on the initial playback
Now Playing metadata only appearing after a lock/unlock/re-registration cycle
media commands being supplied but playback buttons missing from the Lock Screen
requestToBecomeSystemPrimary() returning internalFailure
I have not yet tested the same build on a physical iOS 27 device, so I’m particularly interested in whether this is currently a known Simulator limitation/bug or whether there is another step required when publishing a local playback MediaSession.
Thanks!
0
0
245