HEROLABS / herolabs-apns

A small library to user with the Apple push notification service
24 stars 18 forks source link

Allow sending the default sound #1

Closed brunchboy closed 11 years ago

brunchboy commented 11 years ago

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.

niclasmeier commented 11 years ago

I also updated the version to 0.1.10 and pushed a new lib version to Clojars.