Nirav Patadiya
Nirav Patadiya

Reputation: 97

Custom push notification sound( .wav ) file is not playing in ios7

aps ={ alert = "push message"; badge = 1; id = 557; sound = "seller.wav"; type = 107; };

Though i have added "seller.wav" file in my bundle I could not able to play custom sound,when push comes.

Help me to get this solve.

Thanks in advance.

Upvotes: 2

Views: 2365

Answers (1)

Jesper Schläger
Jesper Schläger

Reputation: 375

Check 'Preparing custom alert sounds' in the documentation:

https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/IPhoneOSClientImp.html

You file might not be the right format. Apple recommends the CAF file format. You can convert a wav file to CAF using afconvert like this:

afconvert /System/Library/Sounds/Submarine.aiff ~/Desktop/sub.caf -d ima4 -f caff -v

(Also from Apple doc)

Upvotes: 1

Related Questions