I am trying to get a custom sound to play when my Apple push notification is delivered. The popup message displays, and the badge updates too, but I always get the default iPhone sound playing instead of my custom sound.
Here's the JSON data I am sending:
{"aps": {"sound": "sound.caf", "badge": 2, "alert": "Successfully registered device"}}
My sound.caf file is at the top level of my Xcode project, and it definitely appears in the resulting .app (as confirmed by 'view package contents' in Finder).
The sound file plays fine on my Mac. Initially I tried .caf, .m4r and .wav files, but none would play. I have also tried using one of the .caf files from an Urban Airship sample project (which I'm pretty confident must work, but admittedly I haven't tried it myself), but that didn't work either.
The Apple docs define the accepted encodings and file formats (.wav, .aiff or .caf).
I've tried very short sound files as well as longer ones (to be sure I am underneath the undocumented 30 second limit).
Has anybody got any other hints/suggestions for me to try?