After updating to iOS 10.1.1 the iOS Notification custom sound stop after 5 seconds.
This happens only if device is turned on, but it plays whole 30 seconds if device is off.
The UNNotificationSound
documentation says:
You can package the audio data in an aiff, wav, or caf file. Sound files must be less than 30 seconds in length. If the sound file is longer than 30 seconds, the system plays the default sound instead.
https://developer.apple.com/reference/usernotifications/unnotificationsound
So if we're able to set 30 second sound files, then there must be a way of allowing them to play for 30 seconds not only 5?
Notifications last no longer than 5 seconds when the device is unlocked, by default. You can't change this behavior programmatically. But the user can change the Notifications settings for the app, so banners will not hide after 5 seconds. She need to set Banner Style to Persistent.
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