Allow sending the default sound #1

merged 1 commit into from Sep 26, 2012


None yet
2 participants

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.

Stop stripping out the "default" sound from APNS objects, because sen…
…ding that

is Apple's recommended way of requesting the default notification sound. If
you omit it, then no sound at all is played.

niclasmeier added a commit that referenced this pull request Sep 26, 2012

@niclasmeier niclasmeier merged commit 8e51c8a into HEROLABS:master Sep 26, 2012


This comment has been minimized.

Show comment Hide comment

niclasmeier Sep 26, 2012


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


niclasmeier commented Sep 26, 2012

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment