I was having trouble figuring out why I could not get the default sound to play when pushing alerts using herolabs-apns, and found that the library is currently stripping out any attempts (via with-sound) to send a value of "default."
There is a difference between having a sound value of default and having no sound value at all. The latter leads to a silent alert, while the former is Apple's preferred way of requesting the standard notification sound. Per the Apple Push Notification Service Programming Guide, Table 2-1 on Page 20:
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…
Since this is a file name, I thought it would be best to convert any keywords to strings, although you may do that elsewhere in the library anyway.
I was having trouble figuring out why I could not get the default sound to play when pushing alerts using herolabs-apns, and found that the library is currently stripping out any attempts (via
with-sound
) to send a value of "default."There is a difference between having a
sound
value ofdefault
and having nosound
value at all. The latter leads to a silent alert, while the former is Apple's preferred way of requesting the standard notification sound. Per the Apple Push Notification Service Programming Guide, Table 2-1 on Page 20:Since this is a file name, I thought it would be best to convert any keywords to strings, although you may do that elsewhere in the library anyway.