Reputation: 6427
Is there a way to disable the push notification sound - whenever the alert comes in.
Currently I am using a blank sound file to do this, but is there a way to disable the sound.
Upvotes: 0
Views: 3341
Reputation: 8947
Go to the preferences application and select "Notifications", select your app and turn off the sound.
Upvotes: -1
Reputation: 17762
You specify a bitmask of notification types when you register for notifications. If you don't want a sound to be played when notifications come in, remove UIRemoteNotificationTypeSound
from that bitmask:
[[UIApplication sharedApplication] registerForRemoteNotificationTypes:(UIRemoteNotificationTypeAlert|UIRemoteNotificationTypeBadge)];
Upvotes: 1
Reputation: 4386
If you dont want to play sounds, you can register for remote notifications again for only alert notification type. If you want the sound should not be played on receiving the alert notification, you should not be sending the sound value in the notification payload sent from the notification server.
Upvotes: 2