I've a really strange behavior of my iOS app. It prevents the device from going to standby. I've already searched if there is anywhere the idleTimeDisabled flag set, but this isn't the case. The idle timer inside the settings app is set to 2 minutes and works within other apps. The device isn't jailbroken and the even restarting the device didn't help. The app was written by somebody else and I'm new to it. So in the moment I don't have any idea what to look for. Has anybody of you an idea, why this could be the case or how I could figure out what's the reason for this behavior?
Thank you very much!
If your app is using AVPlayer
or some other similar AVFoundation
functionality, this can be the cause.
If AVPlayer
is playing a video, a device will not go to sleep while a video is playing.
If the video is playing in a loop, the device will never go to sleep.
Edit: With iOS 12 this is now possible by setting
player.preventsDisplaySleepDuringVideoPlayback = false
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With