From 536e216d2003f49930bfa5eac747af090b2e6fa1 Mon Sep 17 00:00:00 2001 From: Sam Bowling Date: Wed, 1 Jun 2011 07:46:46 -0500 Subject: [PATCH] Modified notification sound to conform to user settings... almost. --- MNWhistleBlowerController.m | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/MNWhistleBlowerController.m b/MNWhistleBlowerController.m index 8e7ee99..e98d0b7 100644 --- a/MNWhistleBlowerController.m +++ b/MNWhistleBlowerController.m @@ -44,18 +44,11 @@ -(id)initWithDelegate:(id)__delegate -(void)alertArrivedWithData:(MNAlertData*)data; { - // Have the device vibrate, if the ringer switch - // is flipped (and if the device supports it) - AudioServicesPlaySystemSound(kSystemSoundID_Vibrate); - - // Play noise, if the ringer switch is not - // flipped (and if the device supports it) - // Don't do this for push notifications - - if (data.type != kPushAlert) - { - AudioServicesPlaySystemSound(1007); - } + // Play sound as an alert so the phone vibrates as the user has set + // This needs the sound pulled from the system settings to play the + // Actual set ringtone. It will still play tritone. + // The setting is in com.apple.springboard.plist sms-sound-identifier + AudioServicesPlayAlertSound(1007); // Wake the device's screen [_delegate wakeDeviceScreen];