iOS Question AVPlayerViewController (iUI8) - Background play


Well-Known Member
Licensed User
Is this: still valid method for background play with AVPlayerViewController?
I have a lot reports that app stop to play music on iPhone 6 and above with iOS 11, working fine on iPhone 5s with iOS 11, also working fine on devices with iOS 10 and below. There is no crash report (I have local Mac with latest xCode v9.2), it's look like system kill app after approx 10 minutes, when screen is off. When music stop and user click on app icon or select app from recent app list, application start loading procedure, so I'm almost sure system killed app in background. I'm also unable to reproduce same behavior with Simulator.
Anyone have solution?

This app is over 2 years old, there is no problem before with lower iOS versions and VideoView.


Well-Known Member
Licensed User
I also need events and option to change stream without creating hundreds of players.
Only problem I have is background mode.
How to tell system "don't kill app" in proper way?

From documentation:
When the UIBackgroundModes key contains the audio value, the system’s media frameworks automatically prevent the corresponding app from being suspended when it moves to the background. As long as it is playing audio or video content or recording audio content, the app continues to run in the background. However, if recording or playback stops, the system suspends the app.

It's look like somehow system don't detect player is playing music for some reason.
Last edited:
Upvote 0