Applications running on iPhone--but not the iPod touch--can trigger vibration using System Audio
Services. The vibrate option is identified using the kSystemSoundID_Vibrate identifier. To trigger
it, use the AudioServicesPlaySystemSound function in the Audio Toolbox framework, as shown
here.
#import <AudioToolbox/AudioToolbox.h>
#import <UIKit/UIKit.h>
- (void)vibratePhone
{
AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);
}
Services. The vibrate option is identified using the kSystemSoundID_Vibrate identifier. To trigger
it, use the AudioServicesPlaySystemSound function in the Audio Toolbox framework, as shown
here.
#import <AudioToolbox/AudioToolbox.h>
#import <UIKit/UIKit.h>
- (void)vibratePhone
{
AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);
}

Leave a comment