Programmatically make the iPhone vibrate [duplicate]
You can use AudioServicesPlaySystemSound(kSystemSoundID_Vibrate); Note that you need to add the AudioToolbox framework and import the following header file: #import <AudioToolbox/AudioServices.h>
You can use AudioServicesPlaySystemSound(kSystemSoundID_Vibrate); Note that you need to add the AudioToolbox framework and import the following header file: #import <AudioToolbox/AudioServices.h>
After serval hours’ digging in the Contact App, I have figured out how it works. ABNewPersonViewControlle invoke some class in ToneLibrary framework to do this. The call stack looks like this: 0 CoreFoundation 0x3359a1d4 CFGetTypeID + 0 1 CoreFoundation 0x33596396 __CFPropertyListIsValidAux + 46 2 CoreFoundation 0x33517090 CFPropertyListCreateData + 124 3 AudioToolbox 0x38ac255a AudioServicesPlaySystemSoundWithVibration + 158 … Read more