I've added a custom sound to my app but it doesn't get played when a push arrives. I've no idea why not, I can't see anything different from what I have done and there are so few steps involved.
1) The sound file is a valid audio file which is audible (I can even click and play it within Xcode).
2) The sound file is present in the app's bundle:
3) The sound file name is specified with the exact name and case in the push payload:
{"aps":{"alert":"Test","badge":0,"sound":"PyngNotification.caf"}}
4) I've tried specifying the name without the extension, just as "PyngNotification".
5) The push arrives and is displayed but the custom sound isn't played.
6) The phone makes the same noise regardless of if the push content contains a sound of "PyngNotification.caf", "default" or "". Its a short buzz type of sound.
7) Sounds are not disabled on the phone, nor for pushes for the app.
8) The app is registering for UIRemoteNotificationTypeSound (if iOS8). (The app displays Sounds as one of the permitted types if viewed via the control panel).
9) I have more than one phone, one with iOS8, one with iOS7. The sounds plays on neither of them.
10) The sound is under 30 seconds.
11) The sound was ma4 and converted to caf using afconvert.
I can't see any steps I've left out, nor anything that is incorrect. Anybody have any ideas?
Tap on the sound file that isn't working in Xcode. Look at the file inspector on the right and make sure the "Target Membership" option is checked.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With