Snorkeler
Snorkeler

Reputation: 101

iOS8.2 not playing custom alert sound from parse.com app

I have successfully set up a push notification app via Parse.com. App is installed on iPhone 5s running iOS8.2. App code in Swift

If I send a regular push notification, it comes up fine, but plays the very short buzz (like 'quick' vibration or very short standard 'note' text alert, rather than what I have set as the standard text alert.

(If I send an iMessage, and have the alert tone set to 'chord', it plays that OK)

If I instead send the dictionary version with a custom sound included in the app bundle (yes, I converted it in terminal per Apple instructions), it still does the same as above. I cannot get it to play any custom alert sounds.

It makes no difference if I originate the push from the app, or from the button on Parse.com

Upvotes: 1

Views: 145

Answers (1)

3x14
3x14

Reputation: 6429

Just as the other person said, ensure that your file is in the correct format (you want it in an generally .caf files)

Also, be sure that you have entered the correct file name when you are sending the push notification if you are using client push.

Example from Parse Docs:

let data = [
"alert" : "The Mets scored! The game is now tied 1-1!",
"badge" : "Increment",
"sounds" : "cheering.caf" //Ensure the file exists in your project
]
let push = PFPush()
push.setChannels(["Mets"])
push.setData(data)
push.sendPushInBackground()

Upvotes: 1

Related Questions