A much better way to change SMS vibration and a few more

Discussion in 'Jailbreaks and iOS Hacks' started by elwood2, Apr 11, 2009.

  1. elwood2 macrumors member

    Joined:
    Mar 20, 2009
    #1
    Every guide i've seen to change the duration/frequency of the vibrations when receiving and SMS all refer to the "Default" Key in SystemSoundVibrationPatterns.plist.

    The problem with that is whenever you're playing a game or any program that has vibrations in it, most of the time it will call on that "Default" key and it will vibrate at whichever duration/frequency that you have set. This is not only annoying in games, it also drains your battery.

    Here's what i've found out:

    Look at SystemSoundBehaviour.plist:
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    	<key>CalendarAlert</key>
    	<dict>
    		<key>RingVibrateIgnore,SilentVibrateOff,RingerSwitchOff</key>
    		<array>
    		</array>
    		<key>RingVibrateIgnore,SilentVibrateOn,RingerSwitchOff</key>
    		<array>
    			<string>Vibrate</string>
    		</array>
    		<key>RingVibrateOff,SilentVibrateIgnore,RingerSwitchOn</key>
    		<array>
    			<string>Beep</string>
    		</array>
    		<key>RingVibrateOn,SilentVibrateIgnore,RingerSwitchOn</key>
    		<array>
    			<string>Beep</string>
    			<string>Vibrate</string>
    		</array>
    	</dict>
    	<key>CameraShutter</key>
    	<dict>
    		<key>RingVibrateIgnore,SilentVibrateOff,RingerSwitchOff</key>
    		<array>
    		</array>
    		<key>RingVibrateIgnore,SilentVibrateOn,RingerSwitchOff</key>
    		<array>
    		</array>
    		<key>RingVibrateOff,SilentVibrateIgnore,RingerSwitchOn</key>
    		<array>
    			<string>Beep</string>
    		</array>
    		<key>RingVibrateOn,SilentVibrateIgnore,RingerSwitchOn</key>
    		<array>
    			<string>Beep</string>
    		</array>
    	</dict>
    	<key>CameraShutterAlwaysHeard</key>
    	<dict>
    		<key>RingVibrateIgnore,SilentVibrateIgnore,RingerSwitchIgnore</key>
    		<array>
    			<string>Beep</string>
    		</array>
    	</dict>
    	<key>ConnectedToPower</key>
    	<dict>
    		<key>RingVibrateIgnore,SilentVibrateIgnore,RingerSwitchOff</key>
    		<array>
    			<string>Vibrate</string>
    		</array>
    		<key>RingVibrateIgnore,SilentVibrateIgnore,RingerSwitchOn</key>
    		<array>
    			<string>Beep</string>
    		</array>
    	</dict>
    	<key>Default</key>
    	<dict>
    		<key>RingVibrateIgnore,SilentVibrateIgnore,RingerSwitchOff</key>
    		<array>
    		</array>
    		<key>RingVibrateIgnore,SilentVibrateIgnore,RingerSwitchOn</key>
    		<array>
    			<string>Beep</string>
    		</array>
    	</dict>
    	<key>FailedUnlock</key>
    	<dict>
    		<key>RingVibrateIgnore,SilentVibrateOff,RingerSwitchOff</key>
    		<array>
    		</array>
    		<key>RingVibrateIgnore,SilentVibrateOn,RingerSwitchOff</key>
    		<array>
    			<string>Vibrate</string>
    		</array>
    		<key>RingVibrateOff,SilentVibrateIgnore,RingerSwitchOn</key>
    		<array>
    			<string>Beep</string>
    		</array>
    		<key>RingVibrateOn,SilentVibrateIgnore,RingerSwitchOn</key>
    		<array>
    			<string>Beep</string>
    			<string>Vibrate</string>
    		</array>
    	</dict>
    	<key>Headset_AnswerCall</key>
    	<dict>
    		<key>RingVibrateIgnore,SilentVibrateIgnore,RingerSwitchIgnore</key>
    		<array>
    		</array>
    	</dict>
    	<key>Headset_CallWaitingActions</key>
    	<dict>
    		<key>RingVibrateIgnore,SilentVibrateIgnore,RingerSwitchIgnore</key>
    		<array>
    			<string>Beep</string>
    		</array>
    	</dict>
    	<key>Headset_EndCall</key>
    	<dict>
    		<key>RingVibrateIgnore,SilentVibrateIgnore,RingerSwitchIgnore</key>
    		<array>
    			<string>Beep</string>
    		</array>
    	</dict>
    	<key>Headset_Redial</key>
    	<dict>
    		<key>RingVibrateIgnore,SilentVibrateIgnore,RingerSwitchIgnore</key>
    		<array>
    			<string>Beep</string>
    		</array>
    	</dict>
    	<key>Headset_StartCall</key>
    	<dict>
    		<key>RingVibrateIgnore,SilentVibrateIgnore,RingerSwitchIgnore</key>
    		<array>
    			<string>Beep</string>
    		</array>
    	</dict>
    	<key>Headset_TransitionEnd</key>
    	<dict>
    		<key>RingVibrateIgnore,SilentVibrateIgnore,RingerSwitchIgnore</key>
    		<array>
    			<string>Beep</string>
    		</array>
    	</dict>
    	<key>KeyPressed</key>
    	<dict>
    		<key>RingVibrateIgnore,SilentVibrateOff,RingerSwitchOff</key>
    		<array>
    		</array>
    		<key>RingVibrateIgnore,SilentVibrateOn,RingerSwitchOff</key>
    		<array>
    		</array>
    		<key>RingVibrateOff,SilentVibrateIgnore,RingerSwitchOn</key>
    		<array>
    			<string>Beep</string>
    		</array>
    		<key>RingVibrateOn,SilentVibrateIgnore,RingerSwitchOn</key>
    		<array>
    			<string>Beep</string>
    		</array>
    	</dict>
    	<key>LowPower</key>
    	<dict>
    		<key>RingVibrateIgnore,SilentVibrateIgnore,RingerSwitchIgnore</key>
    		<array>
    			<string>Beep</string>
    		</array>
    	</dict>
    	<key>MailReceived</key>
    	<dict>
    		<key>RingVibrateIgnore,SilentVibrateOff,RingerSwitchOff</key>
    		<array>
    		</array>
    		<key>RingVibrateIgnore,SilentVibrateOn,RingerSwitchOff</key>
    		<array>
    			<string>Vibrate</string>
    		</array>
    		<key>RingVibrateOff,SilentVibrateIgnore,RingerSwitchOn</key>
    		<array>
    			<string>Beep</string>
    		</array>
    		<key>RingVibrateOn,SilentVibrateIgnore,RingerSwitchOn</key>
    		<array>
    			<string>Beep</string>
    			<string>Vibrate</string>
    		</array>
    	</dict>
    	<key>MailSent</key>
    	<dict>
    		<key>RingVibrateIgnore,SilentVibrateOff,RingerSwitchOff</key>
    		<array>
    		</array>
    		<key>RingVibrateIgnore,SilentVibrateOn,RingerSwitchOff</key>
    		<array>
    		</array>
    		<key>RingVibrateOff,SilentVibrateIgnore,RingerSwitchOn</key>
    		<array>
    			<string>Beep</string>
    		</array>
    		<key>RingVibrateOn,SilentVibrateIgnore,RingerSwitchOn</key>
    		<array>
    			<string>Beep</string>
    		</array>
    	</dict>
    	<key>PINKeyPressed</key>
    	<dict>
    		<key>RingVibrateIgnore,SilentVibrateOff,RingerSwitchOff</key>
    		<array>
    		</array>
    		<key>RingVibrateIgnore,SilentVibrateOn,RingerSwitchOff</key>
    		<array>
    		</array>
    		<key>RingVibrateOff,SilentVibrateIgnore,RingerSwitchOn</key>
    		<array>
    			<string>Beep</string>
    		</array>
    		<key>RingVibrateOn,SilentVibrateIgnore,RingerSwitchOn</key>
    		<array>
    			<string>Beep</string>
    		</array>
    	</dict>
    	<key>RingerSwitchIndication</key>
    	<dict>
    		<key>RingVibrateOff,SilentVibrateOff,RingerSwitchOff</key>
    		<array>
    		</array>
    		<key>RingVibrateOff,SilentVibrateOff,RingerSwitchOn</key>
    		<array>
    		</array>
    		<key>RingVibrateOff,SilentVibrateOn,RingerSwitchOff</key>
    		<array>
    			<string>Vibrate</string>
    		</array>
    		<key>RingVibrateOff,SilentVibrateOn,RingerSwitchOn</key>
    		<array>
    		</array>
    		<key>RingVibrateOn,SilentVibrateOff,RingerSwitchOff</key>
    		<array>
    		</array>
    		<key>RingVibrateOn,SilentVibrateOff,RingerSwitchOn</key>
    		<array>
    			<string>Vibrate</string>
    		</array>
    		<key>RingVibrateOn,SilentVibrateOn,RingerSwitchOff</key>
    		<array>
    			<string>Vibrate</string>
    		</array>
    		<key>RingVibrateOn,SilentVibrateOn,RingerSwitchOn</key>
    		<array>
    		</array>
    	</dict>
    	<key>RingerVibeChanged</key>
    	<dict>
    		<key>RingVibrateOff,SilentVibrateIgnore,RingerSwitchIgnore</key>
    		<array>
    		</array>
    		<key>RingVibrateOn,SilentVibrateIgnore,RingerSwitchIgnore</key>
    		<array>
    			<string>Vibrate</string>
    		</array>
    	</dict>
    	<key>SIMToolkitTone</key>
    	<dict>
    		<key>RingVibrateIgnore,SilentVibrateOff,RingerSwitchOff</key>
    		<array>
    		</array>
    		<key>RingVibrateIgnore,SilentVibrateOn,RingerSwitchOff</key>
    		<array>
    			<string>Vibrate</string>
    		</array>
    		<key>RingVibrateOff,SilentVibrateIgnore,RingerSwitchOn</key>
    		<array>
    			<string>Beep</string>
    		</array>
    		<key>RingVibrateOn,SilentVibrateIgnore,RingerSwitchOn</key>
    		<array>
    			<string>Beep</string>
    			<string>Vibrate</string>
    		</array>
    	</dict>
    	<key>SMSReceived</key>
    	<dict>
    		<key>RingVibrateIgnore,SilentVibrateOff,RingerSwitchOff</key>
    		<array>
    		</array>
    		<key>RingVibrateIgnore,SilentVibrateOn,RingerSwitchOff</key>
    		<array>
    			<string>Vibrate</string>
    		</array>
    		<key>RingVibrateOff,SilentVibrateIgnore,RingerSwitchOn</key>
    		<array>
    			<string>Beep</string>
    		</array>
    		<key>RingVibrateOn,SilentVibrateIgnore,RingerSwitchOn</key>
    		<array>
    			<string>Beep</string>
    			<string>Vibrate</string>
    		</array>
    	</dict>
    	<key>SMSReceived_Alert</key>
    	<dict>
    		<key>RingVibrateIgnore,SilentVibrateOff,RingerSwitchOff</key>
    		<array>
    		</array>
    		<key>RingVibrateIgnore,SilentVibrateOn,RingerSwitchOff</key>
    		<array>
    			<string>Vibrate</string>
    		</array>
    		<key>RingVibrateOff,SilentVibrateIgnore,RingerSwitchOn</key>
    		<array>
    			<string>Beep</string>
    		</array>
    		<key>RingVibrateOn,SilentVibrateIgnore,RingerSwitchOn</key>
    		<array>
    			<string>Beep</string>
    			<string>Vibrate</string>
    		</array>
    	</dict>
    	<key>SMSReceived_Selection</key>
    	<dict>
    		<key>RingVibrateIgnore,SilentVibrateIgnore,RingerSwitchIgnore</key>
    		<array>
    			<string>Beep</string>
    		</array>
    	</dict>
    	<key>SMSReceived_Vibrate</key>
    	<dict>
    		<key>RingVibrateIgnore,SilentVibrateOff,RingerSwitchOff</key>
    		<array>
    		</array>
    		<key>RingVibrateIgnore,SilentVibrateOn,RingerSwitchOff</key>
    		<array>
    			<string>Vibrate</string>
    		</array>
    		<key>RingVibrateOff,SilentVibrateIgnore,RingerSwitchOn</key>
    		<array>
    		</array>
    		<key>RingVibrateOn,SilentVibrateIgnore,RingerSwitchOn</key>
    		<array>
    			<string>Vibrate</string>
    		</array>
    	</dict>
    	<key>SMSSent</key>
    	<dict>
    		<key>RingVibrateIgnore,SilentVibrateOff,RingerSwitchOff</key>
    		<array>
    		</array>
    		<key>RingVibrateIgnore,SilentVibrateOn,RingerSwitchOff</key>
    		<array>
    		</array>
    		<key>RingVibrateOff,SilentVibrateIgnore,RingerSwitchOn</key>
    		<array>
    			<string>Beep</string>
    		</array>
    		<key>RingVibrateOn,SilentVibrateIgnore,RingerSwitchOn</key>
    		<array>
    			<string>Beep</string>
    		</array>
    	</dict>
    	<key>ScreenLocked</key>
    	<dict>
    		<key>RingVibrateIgnore,SilentVibrateOff,RingerSwitchOff</key>
    		<array>
    		</array>
    		<key>RingVibrateIgnore,SilentVibrateOn,RingerSwitchOff</key>
    		<array>
    		</array>
    		<key>RingVibrateOff,SilentVibrateIgnore,RingerSwitchOn</key>
    		<array>
    			<string>Beep</string>
    		</array>
    		<key>RingVibrateOn,SilentVibrateIgnore,RingerSwitchOn</key>
    		<array>
    			<string>Beep</string>
    		</array>
    	</dict>
    	<key>ScreenUnlocked</key>
    	<dict>
    		<key>RingVibrateIgnore,SilentVibrateOff,RingerSwitchOff</key>
    		<array>
    		</array>
    		<key>RingVibrateIgnore,SilentVibrateOn,RingerSwitchOff</key>
    		<array>
    		</array>
    		<key>RingVibrateOff,SilentVibrateIgnore,RingerSwitchOn</key>
    		<array>
    			<string>Beep</string>
    		</array>
    		<key>RingVibrateOn,SilentVibrateIgnore,RingerSwitchOn</key>
    		<array>
    			<string>Beep</string>
    		</array>
    	</dict>
    	<key>SilentVibeChanged</key>
    	<dict>
    		<key>RingVibrateIgnore,SilentVibrateOff,RingerSwitchIgnore</key>
    		<array>
    		</array>
    		<key>RingVibrateIgnore,SilentVibrateOn,RingerSwitchIgnore</key>
    		<array>
    			<string>Vibrate</string>
    		</array>
    	</dict>
    	<key>SystemSoundPreview</key>
    	<dict>
    		<key>RingVibrateIgnore,SilentVibrateIgnore,RingerSwitchOff</key>
    		<array>
    		</array>
    		<key>RingVibrateIgnore,SilentVibrateIgnore,RingerSwitchOn</key>
    		<array>
    			<string>Beep</string>
    		</array>
    	</dict>
    	<key>TouchTone</key>
    	<dict>
    		<key>RingVibrateIgnore,SilentVibrateIgnore,RingerSwitchOff</key>
    		<array>
    		</array>
    		<key>RingVibrateIgnore,SilentVibrateIgnore,RingerSwitchOn</key>
    		<array>
    			<string>Beep</string>
    		</array>
    	</dict>
    	<key>USSDAlert</key>
    	<dict>
    		<key>RingVibrateIgnore,SilentVibrateOff,RingerSwitchOff</key>
    		<array>
    		</array>
    		<key>RingVibrateIgnore,SilentVibrateOn,RingerSwitchOff</key>
    		<array>
    			<string>Vibrate</string>
    		</array>
    		<key>RingVibrateOff,SilentVibrateIgnore,RingerSwitchOn</key>
    		<array>
    			<string>Beep</string>
    		</array>
    		<key>RingVibrateOn,SilentVibrateIgnore,RingerSwitchOn</key>
    		<array>
    			<string>Beep</string>
    			<string>Vibrate</string>
    		</array>
    	</dict>
    	<key>UserAlert</key>
    	<dict>
    		<key>RingVibrateIgnore,SilentVibrateOff,RingerSwitchOff</key>
    		<array>
    		</array>
    		<key>RingVibrateIgnore,SilentVibrateOn,RingerSwitchOff</key>
    		<array>
    			<string>Vibrate</string>
    		</array>
    		<key>RingVibrateOff,SilentVibrateIgnore,RingerSwitchOn</key>
    		<array>
    			<string>Beep</string>
    		</array>
    		<key>RingVibrateOn,SilentVibrateIgnore,RingerSwitchOn</key>
    		<array>
    			<string>Beep</string>
    			<string>Vibrate</string>
    		</array>
    	</dict>
    	<key>Vibrate</key>
    	<dict>
    		<key>RingVibrateIgnore,SilentVibrateOff,RingerSwitchOff</key>
    		<array>
    		</array>
    		<key>RingVibrateIgnore,SilentVibrateOn,RingerSwitchOff</key>
    		<array>
    			<string>Vibrate</string>
    		</array>
    		<key>RingVibrateOff,SilentVibrateIgnore,RingerSwitchOn</key>
    		<array>
    		</array>
    		<key>RingVibrateOn,SilentVibrateIgnore,RingerSwitchOn</key>
    		<array>
    			<string>Vibrate</string>
    		</array>
    	</dict>
    	<key>VoicemailReceived</key>
    	<dict>
    		<key>RingVibrateIgnore,SilentVibrateOff,RingerSwitchOff</key>
    		<array>
    		</array>
    		<key>RingVibrateIgnore,SilentVibrateOn,RingerSwitchOff</key>
    		<array>
    			<string>Vibrate</string>
    		</array>
    		<key>RingVibrateOff,SilentVibrateIgnore,RingerSwitchOn</key>
    		<array>
    			<string>Beep</string>
    		</array>
    		<key>RingVibrateOn,SilentVibrateIgnore,RingerSwitchOn</key>
    		<array>
    			<string>Beep</string>
    			<string>Vibrate</string>
    		</array>
    	</dict>
    </dict>
    </plist>
    
    Every Key here that has a Vibrate string (i think you can add it if it doesn't have it) can be placed in SystemSoundVibrationPatterns.plist and you can set different vibration patterns for different events.

    The key that works for receiving SMS is "SMSReceived_Alert". To change the way your phone vibrates when you receive a SMS, add this line to your SystemSoundVibrationPatterns.plist:
    Code:
    <key>SMSReceived_Alert</key>
    	<dict>
    		<key>Intensity</key>
    		<real>1</real>
    		<key>OffDuration</key>
    		<real>0.3</real>
    		<key>OnDuration</key>
    		<real>0.6</real>
    		<key>TotalDuration</key>
    		<real>4.0</real>
    	</dict>
    You can also change vibrations individually when you get a new email, for a calender alert, or when you get a voicemail, etc. Just copy the whole code from beginning to end and change the key and the settings to your likings.

    I will attach my vibration pattern file so you can see exactly what it should look like. Just change extension to .plist if you plan on using it, of course. Any questions, PM me but i will be going to bed right after i post this so it'll be a while before i respond.

    Good luck!
     

    Attached Files:

  2. CrzyCanuck72 macrumors 6502a

    Joined:
    Jun 10, 2003
    #2
    Excellent find, you're right, it is annoying to have the extended vibrate for things other than calls/texts/emails.

    Is there are a way to do this for incoming calls too?
     
  3. elwood2 thread starter macrumors member

    Joined:
    Mar 20, 2009
    #3
    Not sure. I'm not too worried about incoming calls as it vibrates the entire length of your ringtone. But the frequency could be turned up a bit.
     
  4. skasol macrumors 6502

    Joined:
    Sep 20, 2007
    #4
    where would I put the file?
    where's the folder or the path to put this file in.

    I tried ssh but I couldn't find where I need to either put the file or copy and paste the key, any help would be appreciate it.
     
  5. elwood2 thread starter macrumors member

    Joined:
    Mar 20, 2009
    #5
    The file to replace (SystemSoundVibrationPatterns.plist) is located at: "system/library/privateframeworks/celestial.framework/"
     
  6. skasol macrumors 6502

    Joined:
    Sep 20, 2007
    #6
    Thanks for the quick reply I will attempt when I get back home.
     
  7. KailaAnn macrumors newbie

    Joined:
    Apr 19, 2009
    #7
    Wow...

    Ha ha thanks for the reply to my other posting elwood, but the problem is I'm kind of computer illiterate when it comes to programming..
    Do you know of a way to explain all that to a dummy like me? *blush&*
     

Share This Page