Brett
Brett

Reputation: 167

User-Defined Sounds for Apple Push Notifications?

Is there any way to for a user to choose the alert sound or ring tone upon receiving a push notification from my app, or do all possible sounds needs to be packaged with the app bundle and be determined from the push server?

Upvotes: 0

Views: 2858

Answers (1)

MrTJ
MrTJ

Reputation: 13202

For push notifications as well as for local notification Apple writes so:

Sound The name of a sound file in the application bundle. The sound in this file is played as an alert. If the sound file doesn’t exist or default is specified as the value, the default alert sound is played. The audio must be in one of the audio data formats that are compatible with system sounds; see “Preparing Custom Alert Sounds” for details.

Based on this I would say yes, the sound file has to be in your application's bundle and you can't send it dynamically. Source: https://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/ApplePushService/ApplePushService.html#//apple_ref/doc/uid/TP40008194-CH100-SW1

Upvotes: 2

Related Questions